(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 12.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[    316898,       9096]
NotebookOptionsPosition[    296501,       8775]
NotebookOutlinePosition[    296898,       8791]
CellTagsIndexPosition[    296855,       8788]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.788972490555772*^9, 
  3.788972496044948*^9}},ExpressionUUID->"13910d4b-4b3c-492e-8f2a-\
42430f35133d"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"Compute", " ", "q0"}], ",", "q1", ",", "q2"}], "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"Solve", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"q0", "\[Equal]", "p0"}], "&&", 
       RowBox[{"v0", "==", 
        FractionBox[
         RowBox[{"p", "*", 
          RowBox[{"(", 
           RowBox[{"q1", "-", "q0"}], ")"}]}], 
         RowBox[{"(", 
          RowBox[{"tpP1", "-", "t1"}], ")"}]]}]}], ",", 
      RowBox[{"{", 
       RowBox[{"q0", ",", "q1"}], "}"}]}], "]"}], "//", "FullSimplify"}], 
   "\[IndentingNewLine]", 
   RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"v1", "=", 
     FractionBox[
      RowBox[{"p", "*", 
       RowBox[{"(", 
        RowBox[{"q2", "-", "q1"}], ")"}]}], 
      RowBox[{"(", 
       RowBox[{"t1PpP1", "-", "t2"}], ")"}]]}], ";"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"Solve", "[", 
     RowBox[{
      RowBox[{"a0", "==", 
       FractionBox[
        RowBox[{
         RowBox[{"(", 
          RowBox[{"p", "-", "1"}], ")"}], "*", 
         RowBox[{"(", 
          RowBox[{"v1", "-", "v0"}], ")"}]}], 
        RowBox[{"(", 
         RowBox[{"tpP1", "-", "t2"}], ")"}]]}], ",", 
      RowBox[{"{", "q2", "}"}]}], "]"}], "//", "FullSimplify"}]}]}]], "Input",\

 CellChangeTimes->{{3.788985483264449*^9, 3.788985524960402*^9}, {
  3.788985586902481*^9, 3.788985610833024*^9}, {3.78898575664209*^9, 
  3.788985763765761*^9}},ExpressionUUID->"c5a8e35f-d462-4bbf-a20c-\
9bad1df73599"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"q0", "\[Rule]", "p0"}], ",", 
    RowBox[{"q1", "\[Rule]", 
     RowBox[{"p0", "+", 
      FractionBox[
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "t1"}], "+", "tpP1"}], ")"}], " ", "v0"}], "p"]}]}]}], 
   "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.78898549286747*^9, 3.788985525665703*^9, {3.788985593538587*^9, 
   3.7889856114804087`*^9}},
 CellLabel->
  "Out[182]=",ExpressionUUID->"c41995ca-4514-4d5d-bf98-a624bbfaaeff"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"Compute", " ", "qN"}], ",", "qNm1", ",", "qNm2"}], "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"Solve", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"qN", "\[Equal]", "pf"}], "&&", 
       RowBox[{"vf", "==", 
        FractionBox[
         RowBox[{"p", "*", 
          RowBox[{"(", 
           RowBox[{"qN", "-", "qNm1"}], ")"}]}], 
         RowBox[{"(", 
          RowBox[{"tNPp", "-", "tN"}], ")"}]]}]}], ",", 
      RowBox[{"{", 
       RowBox[{"qN", ",", "qNm1"}], "}"}]}], "]"}], "//", "FullSimplify"}], 
   "\[IndentingNewLine]", 
   RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"vNm2", "=", 
     FractionBox[
      RowBox[{"p", "*", 
       RowBox[{"(", 
        RowBox[{"qNm1", "-", "qNm2"}], ")"}]}], 
      RowBox[{"(", 
       RowBox[{"tNm1Pp", "-", "tNm1"}], ")"}]]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"Solve", "[", 
     RowBox[{
      RowBox[{"af", "==", 
       FractionBox[
        RowBox[{
         RowBox[{"(", 
          RowBox[{"p", "-", "1"}], ")"}], "*", 
         RowBox[{"(", 
          RowBox[{"vf", "-", "vNm2"}], ")"}]}], 
        RowBox[{"(", 
         RowBox[{"tNm1Pp", "-", "tN"}], ")"}]]}], ",", 
      RowBox[{"{", "qNm2", "}"}]}], "]"}], "//", 
    "FullSimplify"}]}]}]], "Input",
 CellChangeTimes->{{3.788985769780929*^9, 3.788985832705647*^9}, {
  3.7889859248745213`*^9, 3.788985929962489*^9}, {3.788986149120821*^9, 
  3.788986149197049*^9}},
 CellLabel->
  "In[206]:=",ExpressionUUID->"1c6177d8-fc59-4b0d-b628-9931ff1d60c4"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"qN", "\[Rule]", "pf"}], ",", 
    RowBox[{"qNm1", "\[Rule]", 
     RowBox[{"pf", "+", 
      FractionBox[
       RowBox[{
        RowBox[{"(", 
         RowBox[{"tN", "-", "tNPp"}], ")"}], " ", "vf"}], "p"]}]}]}], "}"}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.78898549286747*^9, 3.788985525665703*^9, {3.788985593538587*^9, 
   3.7889856115592833`*^9}, 3.788985796915514*^9, 3.788985833106776*^9, {
   3.788985930611455*^9, 3.788985951937724*^9}, 3.788986152517634*^9},
 CellLabel->
  "Out[207]=",ExpressionUUID->"5a0322ec-5fc1-4bf8-824c-7f01d95f700f"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"qNm2", "\[Rule]", 
    FractionBox[
     RowBox[{
      RowBox[{
       SuperscriptBox["p", "2"], " ", "qNm1"}], "-", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"tNm1", "-", "tNm1Pp"}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"af", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "tN"}], "+", "tNm1Pp"}], ")"}]}], "+", "vf"}], 
        ")"}]}], "-", 
      RowBox[{"p", " ", 
       RowBox[{"(", 
        RowBox[{"qNm1", "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "tNm1"}], "+", "tNm1Pp"}], ")"}], " ", "vf"}]}], 
        ")"}]}]}], 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", "p"}]]}], "}"}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.78898549286747*^9, 3.788985525665703*^9, {3.788985593538587*^9, 
   3.7889856115592833`*^9}, 3.788985796915514*^9, 3.788985833106776*^9, {
   3.788985930611455*^9, 3.788985951937724*^9}, 3.788986152577264*^9},
 CellLabel->
  "Out[210]=",ExpressionUUID->"5973b0b0-db90-4f03-a20c-4f7bf5dbd2a1"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"vf", "=", 
   FractionBox[
    RowBox[{"p", "*", 
     RowBox[{"(", 
      RowBox[{"qN", "-", "qNm1"}], ")"}]}], 
    RowBox[{"(", 
     RowBox[{"tNPp", "-", "tN"}], ")"}]]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"vNm2", "=", 
   FractionBox[
    RowBox[{"p", "*", 
     RowBox[{"(", 
      RowBox[{"qNm1", "-", "qNm2"}], ")"}]}], 
    RowBox[{"(", 
     RowBox[{"tNm1Pp", "-", "tNm1"}], ")"}]]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"af", "=", 
   FractionBox[
    RowBox[{
     RowBox[{"(", 
      RowBox[{"p", "-", "1"}], ")"}], "*", 
     RowBox[{"(", 
      RowBox[{"vf", "-", "vNm2"}], ")"}]}], 
    RowBox[{"(", 
     RowBox[{"tNm1Pp", "-", "tN"}], ")"}]]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   SubscriptBox["\[PartialD]", "qN"], 
   RowBox[{"(", 
    RowBox[{"vf", "-", "finalVel"}], ")"}]}], "//", 
  "FullSimplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   SubscriptBox["\[PartialD]", "qNm1"], 
   RowBox[{"(", 
    RowBox[{"vf", "-", "finalVel"}], ")"}]}], "//", 
  "FullSimplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   SubscriptBox["\[PartialD]", "qNm2"], 
   RowBox[{"(", 
    RowBox[{"vf", "-", "finalVel"}], ")"}]}], "//", 
  "FullSimplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   SubscriptBox["\[PartialD]", "qN"], 
   RowBox[{"(", 
    RowBox[{"af", "-", "finalVel"}], ")"}]}], "//", 
  "FullSimplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   SubscriptBox["\[PartialD]", "qNm1"], 
   RowBox[{"(", 
    RowBox[{"af", "-", "finalVel"}], ")"}]}], "//", 
  "FullSimplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    SubscriptBox["\[PartialD]", "qNm2"], 
    RowBox[{"(", 
     RowBox[{"af", "-", "finalVel"}], ")"}]}], "//", "FullSimplify"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.789215524926556*^9, 3.789215672357794*^9}, {
  3.7892157523852987`*^9, 3.789215786893648*^9}},
 CellLabel->"In[46]:=",ExpressionUUID->"3382e6b4-2a7e-4f20-8028-b0ad844e92b0"],

Cell[BoxData[
 FractionBox["p", 
  RowBox[{
   RowBox[{"-", "tN"}], "+", "tNPp"}]]], "Output",
 CellChangeTimes->{
  3.789215617547274*^9, {3.789215654823732*^9, 3.789215672752303*^9}, {
   3.789215757853413*^9, 3.789215787325656*^9}},
 CellLabel->"Out[50]=",ExpressionUUID->"32aab53a-71f5-4653-9f45-ee985063780d"],

Cell[BoxData[
 FractionBox["p", 
  RowBox[{"tN", "-", "tNPp"}]]], "Output",
 CellChangeTimes->{
  3.789215617547274*^9, {3.789215654823732*^9, 3.789215672752303*^9}, {
   3.789215757853413*^9, 3.7892157873288097`*^9}},
 CellLabel->"Out[51]=",ExpressionUUID->"e81619a3-1685-418c-9192-fa3ab1bd3825"],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{
  3.789215617547274*^9, {3.789215654823732*^9, 3.789215672752303*^9}, {
   3.789215757853413*^9, 3.78921578733213*^9}},
 CellLabel->"Out[52]=",ExpressionUUID->"e86870f2-ab64-4a99-a89b-edfdbf103ef0"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", "p"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"tN", "-", "tNm1Pp"}], ")"}], " ", 
   RowBox[{"(", 
    RowBox[{"tN", "-", "tNPp"}], ")"}]}]]], "Output",
 CellChangeTimes->{
  3.789215617547274*^9, {3.789215654823732*^9, 3.789215672752303*^9}, {
   3.789215757853413*^9, 3.7892157873375673`*^9}},
 CellLabel->"Out[53]=",ExpressionUUID->"d511aa40-18e8-46ee-af4f-45b51487cff4"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", "p", " ", 
   RowBox[{"(", 
    RowBox[{
     FractionBox["1", 
      RowBox[{"tNm1", "-", "tNm1Pp"}]], "+", 
     FractionBox["1", 
      RowBox[{"tN", "-", "tNPp"}]]}], ")"}]}], 
  RowBox[{
   RowBox[{"-", "tN"}], "+", "tNm1Pp"}]]], "Output",
 CellChangeTimes->{
  3.789215617547274*^9, {3.789215654823732*^9, 3.789215672752303*^9}, {
   3.789215757853413*^9, 3.789215787342004*^9}},
 CellLabel->"Out[54]=",ExpressionUUID->"98b76b63-ae4b-4010-a883-31be18416e7c"],

Cell[BoxData[
 FractionBox[
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", "p"}], 
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     RowBox[{"-", "tN"}], "+", "tNm1Pp"}], ")"}], " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"-", "tNm1"}], "+", "tNm1Pp"}], ")"}]}]]], "Output",
 CellChangeTimes->{
  3.789215617547274*^9, {3.789215654823732*^9, 3.789215672752303*^9}, {
   3.789215757853413*^9, 3.789215787344964*^9}},
 CellLabel->"Out[55]=",ExpressionUUID->"7e9fc5f9-05cd-4c31-8d6f-4e9e25d41eb1"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"NN", "=", "7"}], ";"}], "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{"$Assumptions", "=", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"q0", "\[Element]", 
       RowBox[{"Matrices", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", "Reals"}], "]"}]}], ",", 
      RowBox[{"q1", "\[Element]", 
       RowBox[{"Matrices", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", "Reals"}], "]"}]}], ",", 
      RowBox[{"q2", "\[Element]", 
       RowBox[{"Matrices", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"3", ",", "1"}], "}"}], ",", "Reals"}], "]"}]}]}], "}"}]}], 
   "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Q", "=", 
   RowBox[{"{", 
    RowBox[{
    "q0", ",", "q1", ",", "q2", ",", " ", "q3", ",", " ", "q4", ",", " ", 
     "qNm2", ",", " ", "qNm2", ",", " ", "qNm2"}], "}"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cost", "=", 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "2"}], 
     RowBox[{"NN", "-", "1"}]], 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{
       RowBox[{"Q", "[", 
        RowBox[{"[", 
         RowBox[{"i", "+", "1"}], "]"}], "]"}], "-", 
       RowBox[{"2", "*", 
        RowBox[{"Q", "[", 
         RowBox[{"[", "i", "]"}], "]"}]}], "+", 
       RowBox[{"Q", "[", 
        RowBox[{"[", 
         RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ")"}], "2"]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   SubscriptBox["\[PartialD]", "qNm2"], "cost"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.789481447023336*^9, 3.789481493402473*^9}, {
  3.789481528768776*^9, 3.78948153097654*^9}, {3.789481648170226*^9, 
  3.789481661640381*^9}, {3.789481700378883*^9, 3.789481837378282*^9}, {
  3.789481878882575*^9, 3.789481942117076*^9}, {3.78948216925528*^9, 
  3.789482170310238*^9}, {3.789482234214984*^9, 3.789482244351119*^9}, {
  3.789484863263303*^9, 3.7894849091587763`*^9}, {3.789484954534605*^9, 
  3.789485072744752*^9}, {3.789485130622232*^9, 3.789485133697946*^9}, {
  3.789485235979742*^9, 3.789485259050737*^9}, {3.7894858655559273`*^9, 
  3.789485870390175*^9}, {3.789486003797708*^9, 3.78948600802943*^9}, {
  3.789486158047029*^9, 3.7894861606382713`*^9}, {3.789896309728231*^9, 
  3.7898963112266893`*^9}},
 CellLabel->"In[1]:=",ExpressionUUID->"7274f37f-2dd0-4801-b976-63d19197850c"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"-", "2"}], " ", 
   RowBox[{"(", 
    RowBox[{"q4", "-", "qNm2"}], ")"}]}], "+", 
  RowBox[{"2", " ", 
   RowBox[{"(", 
    RowBox[{"q3", "-", 
     RowBox[{"2", " ", "q4"}], "+", "qNm2"}], ")"}]}]}]], "Output",
 CellChangeTimes->{
  3.7894850923945208`*^9, 3.789485135191164*^9, {3.789485214627811*^9, 
   3.789485259177121*^9}, {3.789485443367826*^9, 3.789485448863782*^9}, {
   3.789485509265909*^9, 3.78948551074124*^9}, {3.789485865724083*^9, 
   3.789485870995126*^9}, {3.7894860039719152`*^9, 3.789486008172142*^9}, 
   3.7894861608350277`*^9, {3.789486361814286*^9, 3.789486362770523*^9}, 
   3.789896314072535*^9},
 CellLabel->"Out[5]=",ExpressionUUID->"b492d0dd-ff8e-487e-a29c-1c5ab377f8f9"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{"Compute", " ", "qN"}], ",", "qNm1", ",", "qNm2"}], "*)"}], 
  "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"vi", "=", 
     FractionBox[
      RowBox[{"p", "*", 
       RowBox[{"(", 
        RowBox[{"qiP1", "-", "qi"}], ")"}]}], 
      RowBox[{"(", 
       RowBox[{"tiPpP1", "-", "t1P1"}], ")"}]]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"viP1", "=", 
     FractionBox[
      RowBox[{"p", "*", 
       RowBox[{"(", 
        RowBox[{"qiP2", "-", "qiP1"}], ")"}]}], 
      RowBox[{"(", 
       RowBox[{"tiPpP2", "-", "t1P2"}], ")"}]]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"Solve", "[", 
     RowBox[{
      RowBox[{"ai", "==", 
       FractionBox[
        RowBox[{
         RowBox[{"(", 
          RowBox[{"p", "-", "1"}], ")"}], "*", 
         RowBox[{"(", 
          RowBox[{"viP1", "-", "q0"}], ")"}]}], 
        RowBox[{"(", 
         RowBox[{"tiPpP1", "-", "tiP2"}], ")"}]]}], ",", 
      RowBox[{"{", "qiP2", "}"}]}], "]"}], "//", 
    "FullSimplify"}]}]}]], "Input",
 CellChangeTimes->{{3.790428416349018*^9, 3.7904284658097486`*^9}, {
  3.7904284974497843`*^9, 3.7904285735698338`*^9}},
 CellLabel->"In[1]:=",ExpressionUUID->"88069599-2df9-4f93-9f40-006ed9c0762d"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"qiP2", "\[Rule]", 
    FractionBox[
     RowBox[{
      RowBox[{
       SuperscriptBox["p", "2"], " ", "qiP1"}], "-", 
      RowBox[{"p", " ", 
       RowBox[{"(", 
        RowBox[{"qiP1", "+", 
         RowBox[{"q0", " ", 
          RowBox[{"(", 
           RowBox[{"t1P2", "-", "tiPpP2"}], ")"}]}]}], ")"}]}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"q0", "+", 
         RowBox[{"ai", " ", 
          RowBox[{"(", 
           RowBox[{"tiP2", "-", "tiPpP1"}], ")"}]}]}], ")"}], " ", 
       RowBox[{"(", 
        RowBox[{"t1P2", "-", "tiPpP2"}], ")"}]}]}], 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "1"}], "+", "p"}], ")"}], " ", "p"}]]}], "}"}], 
  "}"}]], "Output",
 CellChangeTimes->{3.7904285742419167`*^9},
 CellLabel->"Out[4]=",ExpressionUUID->"0cd1f7a9-71c8-423d-a64f-9b7bb07b863c"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"NN", "=", "7"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Q", "=", 
   RowBox[{"{", 
    RowBox[{
    "q0", ",", "q1", ",", "q2", ",", " ", "q3", ",", " ", "q4", ",", " ", 
     "qNm2", ",", " ", "qNm2", ",", " ", "qNm2"}], "}"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"cost", "=", 
   RowBox[{
    UnderoverscriptBox["\[Sum]", 
     RowBox[{"i", "=", "2"}], 
     RowBox[{"NN", "-", "1"}]], 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{
       RowBox[{"Q", "[", 
        RowBox[{"[", 
         RowBox[{"i", "+", "1"}], "]"}], "]"}], "-", 
       RowBox[{"2", "*", 
        RowBox[{"Q", "[", 
         RowBox[{"[", "i", "]"}], "]"}]}], "+", 
       RowBox[{"Q", "[", 
        RowBox[{"[", 
         RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ")"}], "2"]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"var", "=", 
   RowBox[{"{", 
    RowBox[{
    "q0", ",", "q1", ",", "q2", ",", " ", "q3", ",", " ", "q4", ",", " ", 
     "qNm2"}], "}"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"A", "=", 
   RowBox[{
    RowBox[{"1", "/", "2"}], " ", 
    RowBox[{"D", "[", 
     RowBox[{"cost", ",", 
      RowBox[{"{", 
       RowBox[{"var", ",", "2"}], "}"}]}], "]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"var", ".", "A", ".", "var"}], "-", "cost"}], " ", "//", 
  "FullSimplify"}]}], "Input",
 CellChangeTimes->{{3.790619461374023*^9, 3.790619466058573*^9}, {
   3.790619504907148*^9, 3.790619587175496*^9}, {3.790619631385745*^9, 
   3.790619742764646*^9}, 3.790619881558325*^9},
 CellLabel->"In[76]:=",ExpressionUUID->"0b4c8741-1730-4cb0-acbf-aee85a17b195"],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{
  3.790619461982753*^9, {3.790619518465966*^9, 3.790619531052561*^9}, {
   3.790619561221863*^9, 3.790619587860985*^9}, {3.790619679332781*^9, 
   3.790619719461905*^9}, 3.790619881995336*^9},
 CellLabel->"Out[82]=",ExpressionUUID->"0193189b-9019-4ce7-868a-24e32f9dca8c"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
  RowBox[{"(*", 
   RowBox[{
    RowBox[{
    "q4", " ", "es", " ", "el", " ", "nodo", " ", "del", " ", "cual", " ", 
     "quiero", " ", "calcular", " ", "el", " ", "h"}], "=", 
    RowBox[{"cost", "-", "to", "-", "go"}]}], "*)"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Q", "=", 
   RowBox[{"{", 
    RowBox[{
    "q0", ",", "q1", ",", "q2", ",", " ", "q3", ",", " ", "q4", ",", "q5", 
     ",", "q6", ",", "q7", ",", "q8", ",", "q9", ",", " ", "qNm2", ",", " ", 
     "qNm2", ",", " ", "qNm2"}], "}"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{
   RowBox[{"cost", "=", 
    RowBox[{
     UnderoverscriptBox["\[Sum]", 
      RowBox[{"i", "=", "7"}], "12"], 
     SuperscriptBox[
      RowBox[{"(", 
       RowBox[{
        RowBox[{"Q", "[", 
         RowBox[{"[", 
          RowBox[{"i", "+", "1"}], "]"}], "]"}], "-", 
        RowBox[{"2", "*", 
         RowBox[{"Q", "[", 
          RowBox[{"[", "i", "]"}], "]"}]}], "+", 
        RowBox[{"Q", "[", 
         RowBox[{"[", 
          RowBox[{"i", "-", "1"}], "]"}], "]"}]}], ")"}], "2"]}]}], ";"}], 
  RowBox[{"(*", 
   RowBox[{
   "Empiezo", " ", "con", " ", "q4", " ", "en", " ", "el", " ", "medio"}], 
   "*)"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"var", "=", 
   RowBox[{"{", "  ", 
    RowBox[{"q7", ",", "q8", ",", "q9"}], "}"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"A", "=", " ", 
   RowBox[{"D", "[", 
    RowBox[{"cost", ",", 
     RowBox[{"{", 
      RowBox[{"var", ",", "2"}], "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"b", "=", 
    RowBox[{"D", "[", 
     RowBox[{
      RowBox[{"cost", "-", 
       RowBox[{
        RowBox[{"1", "/", "2"}], 
        RowBox[{"var", ".", "A", ".", "var"}]}]}], ",", 
      RowBox[{"{", 
       RowBox[{"var", ",", "1"}], "}"}]}], "]"}]}], ";"}], " ", "//", 
  "FullSimplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c", "=", 
   RowBox[{"cost", "-", 
    RowBox[{
     RowBox[{"1", "/", "2"}], 
     RowBox[{"var", ".", "A", ".", "var"}]}], "-", 
    RowBox[{"b", ".", "var"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"1", "/", "2"}], 
    RowBox[{"var", ".", "A", ".", "var"}]}], "+", 
   RowBox[{"b", ".", "var"}], "+", "c", " ", "-", " ", "cost"}], " ", "//", 
  "FullSimplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"A", "//", "FullSimplify"}], "//", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"b", "//", "FullSimplify"}], "//", 
  "MatrixForm"}], "\[IndentingNewLine]", 
 RowBox[{"c", "//", "FullSimplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
    RowBox[{
    "The", " ", "optimal", " ", "cost", " ", "to", " ", "the", " ", "opt", 
     " ", "problem", " ", "cost"}], "=", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"1", "/", "2"}], 
       RowBox[{"x", "'"}], "Ax"}], " ", "+", " ", "bx", " ", "+", 
      RowBox[{"c", " ", "is", " ", "cost_optimal"}]}], "=", " ", 
     RowBox[{
      RowBox[{
       RowBox[{
        RowBox[{"-", "1"}], "/", "2"}], 
       RowBox[{"bA", "^", 
        RowBox[{"-", "1"}]}], 
       RowBox[{"b", "'"}]}], "+", "c"}]}]}], "*)"}], " "}]}], "Input",
 CellChangeTimes->{
  3.790619740840535*^9, {3.7906197813456593`*^9, 3.7906197987215147`*^9}, {
   3.790619830641755*^9, 3.7906198377371807`*^9}, 3.790619885871558*^9, {
   3.790619917442252*^9, 3.790619951294052*^9}, {3.790620070819825*^9, 
   3.790620072643903*^9}, {3.790620110285022*^9, 3.79062018527029*^9}, {
   3.7906202376955013`*^9, 3.7906202564528093`*^9}, {3.790620685390995*^9, 
   3.790620754154731*^9}, {3.790622071553068*^9, 3.790622074581959*^9}, {
   3.7906221475406027`*^9, 3.790622148323267*^9}, {3.790622224666353*^9, 
   3.790622246753208*^9}, {3.7906227164387817`*^9, 3.7906227254869747`*^9}, {
   3.7906227609122057`*^9, 3.790622761229147*^9}, {3.790622801830213*^9, 
   3.790622879351634*^9}, {3.7906229174765863`*^9, 3.790622959516493*^9}, {
   3.790623058261298*^9, 3.790623127213863*^9}, 3.7906237527650623`*^9, {
   3.790624123844036*^9, 3.790624184981221*^9}, {3.790624268550099*^9, 
   3.790624307771577*^9}, {3.79068094761721*^9, 3.7906809501404657`*^9}, {
   3.790681049060491*^9, 3.790681059667656*^9}},
 CellLabel->"In[34]:=",ExpressionUUID->"d5d0d391-d579-4dc1-ac57-87214064f668"],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{{3.7906206894963017`*^9, 3.79062075479493*^9}, 
   3.79062207520372*^9, 3.790622149422908*^9, {3.790622228385311*^9, 
   3.7906222470337353`*^9}, 3.790622841313842*^9, {3.790622872376256*^9, 
   3.790622879974588*^9}, {3.790622914296575*^9, 3.79062296451588*^9}, 
   3.790623762186323*^9, {3.790624126374264*^9, 3.790624155680327*^9}, 
   3.7906242692380953`*^9, 3.790624308502616*^9, 3.790681065283029*^9},
 CellLabel->"Out[41]=",ExpressionUUID->"3fea5026-982b-445b-9ac3-570e19c1e78e"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"12", 
      RowBox[{"-", "8"}], "2"},
     {
      RowBox[{"-", "8"}], "12", 
      RowBox[{"-", "8"}]},
     {"2", 
      RowBox[{"-", "8"}], "12"}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.7906206894963017`*^9, 3.79062075479493*^9}, 
   3.79062207520372*^9, 3.790622149422908*^9, {3.790622228385311*^9, 
   3.7906222470337353`*^9}, 3.790622841313842*^9, {3.790622872376256*^9, 
   3.790622879974588*^9}, {3.790622914296575*^9, 3.79062296451588*^9}, 
   3.790623762186323*^9, {3.790624126374264*^9, 3.790624155680327*^9}, 
   3.7906242692380953`*^9, 3.790624308502616*^9, 3.79068106528487*^9},
 CellLabel->
  "Out[42]//MatrixForm=",ExpressionUUID->"9ecfc488-f43b-41fd-b71a-\
2895c9da3bd5"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", 
   TagBox[GridBox[{
      {
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{"q5", "-", 
          RowBox[{"4", " ", "q6"}]}], ")"}]}]},
      {
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{"q6", "+", "qNm2"}], ")"}]}]},
      {
       RowBox[{
        RowBox[{"-", "6"}], " ", "qNm2"}]}
     },
     GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}}],
    Column], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.7906206894963017`*^9, 3.79062075479493*^9}, 
   3.79062207520372*^9, 3.790622149422908*^9, {3.790622228385311*^9, 
   3.7906222470337353`*^9}, 3.790622841313842*^9, {3.790622872376256*^9, 
   3.790622879974588*^9}, {3.790622914296575*^9, 3.79062296451588*^9}, 
   3.790623762186323*^9, {3.790624126374264*^9, 3.790624155680327*^9}, 
   3.7906242692380953`*^9, 3.790624308502616*^9, 3.790681065286594*^9},
 CellLabel->
  "Out[43]//MatrixForm=",ExpressionUUID->"66dcb714-b2af-487a-b0a1-\
47f6f9e7f69f"],

Cell[BoxData[
 RowBox[{
  SuperscriptBox["q5", "2"], "-", 
  RowBox[{"4", " ", "q5", " ", "q6"}], "+", 
  RowBox[{"5", " ", 
   SuperscriptBox["q6", "2"]}], "+", 
  RowBox[{"2", " ", 
   SuperscriptBox["qNm2", "2"]}]}]], "Output",
 CellChangeTimes->{{3.7906206894963017`*^9, 3.79062075479493*^9}, 
   3.79062207520372*^9, 3.790622149422908*^9, {3.790622228385311*^9, 
   3.7906222470337353`*^9}, 3.790622841313842*^9, {3.790622872376256*^9, 
   3.790622879974588*^9}, {3.790622914296575*^9, 3.79062296451588*^9}, 
   3.790623762186323*^9, {3.790624126374264*^9, 3.790624155680327*^9}, 
   3.7906242692380953`*^9, 3.790624308502616*^9, 3.790681065306131*^9},
 CellLabel->"Out[44]=",ExpressionUUID->"486a55b2-bf8b-4cde-b3dd-1822a9b77719"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"Inverse", "[", "A", "]"}], ".", "b"}], "//", "MatrixForm"}], "//",
   "FullSimplify"}]], "Input",
 CellChangeTimes->{{3.790622114047122*^9, 3.7906221545451*^9}},
 CellLabel->
  "In[288]:=",ExpressionUUID->"2c0987ad-85eb-48f1-895a-1b57b386e9b0"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", 
   TagBox[GridBox[{
      {
       RowBox[{
        FractionBox["1", "21"], " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"10", " ", "q1"}], "-", 
          RowBox[{"28", " ", "q2"}], "-", 
          RowBox[{"3", " ", "qNm2"}]}], ")"}]}]},
      {
       RowBox[{
        FractionBox["1", "35"], " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"20", " ", "q1"}], "-", 
          RowBox[{"42", " ", "q2"}], "-", 
          RowBox[{"13", " ", "qNm2"}]}], ")"}]}]},
      {
       RowBox[{
        FractionBox["1", "35"], " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"15", " ", "q1"}], "-", 
          RowBox[{"28", " ", "q2"}], "-", 
          RowBox[{"22", " ", "qNm2"}]}], ")"}]}]},
      {
       RowBox[{
        FractionBox["1", "21"], " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"4", " ", "q1"}], "-", 
          RowBox[{"7", " ", "q2"}], "-", 
          RowBox[{"18", " ", "qNm2"}]}], ")"}]}]}
     },
     GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}}],
    Column], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.790622116670885*^9, 3.790622155143499*^9}},
 CellLabel->
  "Out[288]//MatrixForm=",ExpressionUUID->"98a4bb52-9889-4611-8c35-\
bac8cfb746e3"]
}, Open  ]],

Cell[BoxData[
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}]], "Input",ExpressionUUID->"599708d3-08ef-42cb-92b1-eeb21aaa26f8"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"p", "=", 
    RowBox[{
     FractionBox["1", 
      RowBox[{"2", "*", "3"}]], "*", 
     RowBox[{
      TagBox[
       RowBox[{"(", GridBox[{
          {"1", "u", 
           RowBox[{"u", "*", "u"}], 
           RowBox[{"u", "*", "u", "*", "u"}]}
         }], ")"}],
       Function[BoxForm`e$, 
        MatrixForm[BoxForm`e$]]], ".", 
      RowBox[{"(", GridBox[{
         {"1", "4", 
          RowBox[{"-", "1"}], "0"},
         {
          RowBox[{"-", "3"}], "0", "3", "0"},
         {"3", 
          RowBox[{"-", "6"}], "3", "0"},
         {
          RowBox[{"-", "1"}], "3", 
          RowBox[{"-", "3"}], "1"}
        }], ")"}], ".", 
      TagBox[
       RowBox[{"(", "\[NoBreak]", 
        TagBox[GridBox[{
           {"qiM3"},
           {"qiM2"},
           {"qiM1"},
           {"qi"}
          },
          GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
          
          GridBoxSpacings->{"Columns" -> {
              Offset[0.27999999999999997`], {
               Offset[0.5599999999999999]}, 
              Offset[0.27999999999999997`]}, "Rows" -> {
              Offset[0.2], {
               Offset[0.4]}, 
              Offset[0.2]}}],
         Column], "\[NoBreak]", ")"}],
       Function[BoxForm`e$, 
        MatrixForm[BoxForm`e$]]]}]}]}], ";"}], 
  "\[IndentingNewLine]"}]], "Input",
 CellChangeTimes->{{3.791738972931127*^9, 3.791739049654776*^9}, 
   3.7917390894483013`*^9, {3.791739149810359*^9, 3.791739237874872*^9}, {
   3.791739308759007*^9, 3.7917393396088467`*^9}},
 CellLabel->"In[2]:=",ExpressionUUID->"fb728b87-753c-4f51-bf54-bffef4c25d00"],

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"times", "=", 
   TagBox[
    RowBox[{"(", GridBox[{
       {"1", "t", 
        RowBox[{"t", "*", "t"}], 
        RowBox[{"t", "*", "t", "*", "t"}]}
      }], ")"}],
    Function[BoxForm`e$, 
     MatrixForm[BoxForm`e$]]]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"px", "=", 
   RowBox[{"times", ".", 
    RowBox[{"(", "\[NoBreak]", 
     TagBox[GridBox[{
        {"dx"},
        {"cx"},
        {"bx"},
        {"ax"}
       },
       GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
       GridBoxSpacings->{"Columns" -> {
           Offset[0.27999999999999997`], {
            Offset[0.5599999999999999]}, 
           Offset[0.27999999999999997`]}, "Rows" -> {
           Offset[0.2], {
            Offset[0.4]}, 
           Offset[0.2]}}],
      Column], "\[NoBreak]", ")"}]}]}], ";", 
  RowBox[{"py", "=", 
   RowBox[{"times", ".", 
    RowBox[{"(", "\[NoBreak]", 
     TagBox[GridBox[{
        {"dy"},
        {"cy"},
        {"by"},
        {"ay"}
       },
       GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
       GridBoxSpacings->{"Columns" -> {
           Offset[0.27999999999999997`], {
            Offset[0.5599999999999999]}, 
           Offset[0.27999999999999997`]}, "Rows" -> {
           Offset[0.2], {
            Offset[0.4]}, 
           Offset[0.2]}}],
      Column], "\[NoBreak]", ")"}]}]}], ";", 
  RowBox[{"pz", "=", 
   RowBox[{"times", ".", 
    RowBox[{"(", "\[NoBreak]", 
     TagBox[GridBox[{
        {"dz"},
        {"cz"},
        {"bz"},
        {"az"}
       },
       GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
       GridBoxSpacings->{"Columns" -> {
           Offset[0.27999999999999997`], {
            Offset[0.5599999999999999]}, 
           Offset[0.27999999999999997`]}, "Rows" -> {
           Offset[0.2], {
            Offset[0.4]}, 
           Offset[0.2]}}],
      Column], "\[NoBreak]", ")"}]}]}], 
  ";"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.792329393897843*^9, 3.792329426280695*^9}, {
   3.792329465562796*^9, 3.7923295904400873`*^9}, 3.792329637692977*^9, {
   3.792329693004911*^9, 3.792329988897708*^9}, {3.792330021453321*^9, 
   3.792330033343191*^9}, {3.7923300660921097`*^9, 3.792330152336322*^9}, {
   3.79233021320149*^9, 3.792330213485097*^9}, {3.792330262591228*^9, 
   3.792330285017375*^9}, {3.79233032392904*^9, 3.7923303654839582`*^9}},
 CellLabel->"In[61]:=",ExpressionUUID->"4eced7a3-b604-4b4c-98de-204ff0d90cdf"],

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"a", "=", 
   RowBox[{"(", GridBox[{
      {"l1a", "0", "0", "l2a", "0", "0", "l3a", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}], "0", "0"},
      {"0", "l1a", "0", "0", "l2a", "0", "0", "l3a", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}], "0"},
      {"0", "0", "l1a", "0", "0", "l2a", "0", "0", "l3a", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}]},
      {"l1b", "0", "0", "l2b", "0", "0", "l3b", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}], "0", "0"},
      {"0", "l1b", "0", "0", "l2b", "0", "0", "l3b", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}], "0"},
      {"0", "0", "l1b", "0", "0", "l2b", "0", "0", "l3b", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}]},
      {"l1c", "0", "0", "l2c", "0", "0", "l3c", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}], "0", "0"},
      {"0", "l1c", "0", "0", "l2c", "0", "0", "l3c", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}], "0"},
      {"0", "0", "l1c", "0", "0", "l2c", "0", "0", "l3c", "0", "0", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}]},
      {"l1d", "0", "0", "l2d", "0", "0", "l3d", "0", "0", 
       RowBox[{"(", 
        RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], "0", "0"},
      {"0", "l1d", "0", "0", "l2d", "0", "0", "l3d", "0", "0", 
       RowBox[{"(", 
        RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], "0"},
      {"0", "0", "l1d", "0", "0", "l2d", "0", "0", "l3d", "0", "0", 
       RowBox[{"(", 
        RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}]}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"cost", "=", 
   RowBox[{"Det", "[", 
    RowBox[{"(", GridBox[{
       {"x1", "x2", "x3", "x4"},
       {"y1", "y2", "y3", "y4"},
       {"z1", "z2", "z3", "z4"},
       {"1", "1", "1", "1"}
      }], ")"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"Minimize", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"Det", "[", 
      RowBox[{"(", GridBox[{
         {"x1", "x2", "x3", "x4"},
         {"y1", "y2", "y3", "y4"},
         {"z1", "z2", "z3", "z4"},
         {"1", "1", "1", "1"}
        }], ")"}], "]"}], ",", 
     RowBox[{"ax", "\[Equal]", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"l1a", "*", " ", "x1"}], "+", 
        RowBox[{"l2a", " ", "*", "x2"}], "+", 
        RowBox[{"l3a", "*", " ", "x3"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}], "*", " ", 
         "x4"}]}], ")"}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "ay"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1a", " ", "*", "y1"}], "+", 
       RowBox[{"l2a", " ", "*", "y2"}], "+", 
       RowBox[{"l3a", "*", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}], "*", " ", 
        "y4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "az"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1a", "*", " ", "z1"}], "+", 
       RowBox[{"l2a", "*", " ", "z2"}], "+", 
       RowBox[{"l3a", " ", "*", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}], " ", "*", 
        "z4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "bx"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1b", "*", " ", "x1"}], "+", 
       RowBox[{"l2b", "*", " ", "x2"}], "+", 
       RowBox[{"l3b", " ", "*", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}], "*", " ", 
        "x4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "by"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1b", " ", "*", "y1"}], "+", 
       RowBox[{"l2b", " ", "*", "y2"}], "+", 
       RowBox[{"l3b", " ", "*", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}], "*", " ", 
        "y4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "bz"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1b", " ", "*", "z1"}], "+", 
       RowBox[{"l2b", " ", "*", "z2"}], "+", 
       RowBox[{"l3b", "*", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}], "*", " ", 
        "z4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "cx"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1c", "*", " ", "x1"}], "+", 
       RowBox[{"l2c", "*", " ", "x2"}], "+", 
       RowBox[{"l3c", "*", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}], "*", " ", 
        "x4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "cy"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1c", " ", "*", "y1"}], "+", 
       RowBox[{"l2c", " ", "*", "y2"}], "+", 
       RowBox[{"l3c", "*", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}], "*", " ", 
        "y4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "cz"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1c", " ", "*", "z1"}], "+", 
       RowBox[{"l2c", " ", "*", "z2"}], "+", 
       RowBox[{"l3c", "*", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}], "*", " ", 
        "z4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "dx"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1d", " ", "*", "x1"}], "+", 
       RowBox[{"l2d", " ", "*", "x2"}], "+", 
       RowBox[{"l3d", "*", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], "*", " ", 
        "x4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "dy"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1d", " ", "*", "y1"}], "+", 
       RowBox[{"l2d", "*", " ", "y2"}], "+", 
       RowBox[{"l3d", "*", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], "*", " ", 
        "y4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "dz"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1d", " ", "*", "z1"}], "+", 
       RowBox[{"l2d", "*", " ", "z2"}], "+", 
       RowBox[{"l3d", " ", "*", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], "*", " ", 
        "z4"}]}]}], ",", "\\\[IndentingNewLine]"}], "  ", "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
    "x1", ",", "y1", ",", "z1", ",", "x2", ",", "y2", ",", "z2", ",", "x3", 
     ",", "y3", ",", "z3", ",", "x4", ",", "y4", ",", "z4", ",", "l1a", ",", 
     "l2a", ",", "l3a", ",", "l1b", ",", "l2b", ",", "l3b", ",", "l1c", ",", 
     "l2c", ",", "l3c", ",", "l1d", ",", "l2d", ",", "l3d"}], "}"}]}], 
  "]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{
  3.792343398180849*^9, {3.792343464164925*^9, 3.7923434941825743`*^9}, {
   3.792343533838356*^9, 3.792343709850774*^9}, {3.792344258233279*^9, 
   3.7923443960366907`*^9}, {3.79234442836166*^9, 3.7923445139350843`*^9}, {
   3.792344562045176*^9, 3.79234456358182*^9}, {3.79234503627899*^9, 
   3.792345070426663*^9}, 3.792345101828533*^9, {3.792345133094611*^9, 
   3.792345242419757*^9}, {3.7923453988356533`*^9, 3.792345399250126*^9}, 
   3.7923456567886953`*^9, {3.792346316711912*^9, 3.792346333624463*^9}, {
   3.7923507131605253`*^9, 3.79235072826276*^9}, {3.792350930732977*^9, 
   3.79235094093928*^9}, 
   3.792355326812004*^9},ExpressionUUID->"b0fc30df-a69e-4b44-b23c-\
ede9719acd02"],

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"v1", "=", 
   RowBox[{"(", GridBox[{
      {"v1x"},
      {"v1y"},
      {"v1z"}
     }], ")"}]}], ";", 
  RowBox[{"v2", "=", 
   RowBox[{"(", GridBox[{
      {"v2x"},
      {"v2y"},
      {"v2z"}
     }], ")"}]}], ";", 
  RowBox[{"v3", "=", 
   RowBox[{"(", GridBox[{
      {"v3x"},
      {"v3y"},
      {"v3z"}
     }], ")"}]}], ";", 
  RowBox[{"v4", "=", 
   RowBox[{"(", GridBox[{
      {"v4x"},
      {"v4y"},
      {"v4z"}
     }], ")"}]}], ";", 
  RowBox[{"M", "=", 
   RowBox[{"(", GridBox[{
      {"1", "0"},
      {"0", "0"}
     }], ")"}]}], ";", 
  RowBox[{"T", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"S1", "=", 
   RowBox[{"(", GridBox[{
      {"s111", "s112"},
      {"s121", "s122"}
     }], ")"}]}], ";", 
  RowBox[{"S2", "=", 
   RowBox[{"(", GridBox[{
      {"s211", "s212"},
      {"s221", "s222"}
     }], ")"}]}], ";", 
  RowBox[{"S3", "=", 
   RowBox[{"(", GridBox[{
      {"s311", "s312"},
      {"s321", "s322"}
     }], ")"}]}], ";", 
  RowBox[{"S4", "=", 
   RowBox[{"(", GridBox[{
      {"s411", "s412"},
      {"s421", "s422"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R1", "=", 
   RowBox[{"(", GridBox[{
      {"r111", "r112"},
      {"r121", "r122"}
     }], ")"}]}], ";", 
  RowBox[{"R2", "=", 
   RowBox[{"(", GridBox[{
      {"r211", "r212"},
      {"r221", "r222"}
     }], ")"}]}], ";", 
  RowBox[{"R3", "=", 
   RowBox[{"(", GridBox[{
      {"r311", "r312"},
      {"r321", "r322"}
     }], ")"}]}], ";", 
  RowBox[{"R4", "=", 
   RowBox[{"(", GridBox[{
      {"r411", "r412"},
      {"r421", "r422"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SumRi3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"Transpose", "[", "R1", "]"}], ".", "R1"}], "+", 
    RowBox[{
     RowBox[{"Transpose", "[", "R2", "]"}], ".", "R2"}], "+", 
    RowBox[{
     RowBox[{"Transpose", "[", "R3", "]"}], ".", "R3"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SumSi3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"Transpose", "[", "S1", "]"}], ".", "S1"}], "+", 
    RowBox[{
     RowBox[{"Transpose", "[", "S2", "]"}], ".", "S2"}], "+", 
    RowBox[{
     RowBox[{"Transpose", "[", "S3", "]"}], ".", "S3"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R4TR4", "=", 
   RowBox[{"M", "-", "SumRi3"}]}], ";", 
  RowBox[{"S4TS4", "=", 
   RowBox[{"M", "-", "SumSi3"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"wwwwwwwwwwwwwwwwwwwwwwwwwwwwww", ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SumRivi3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R1", "]"}], ".", "R1"}], "*", "v1x"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R2", "]"}], ".", "R2"}], "*", "v2x"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R3", "]"}], ".", "R3"}], "*", "v3x"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SumSivi3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S1", "]"}], ".", "S1"}], "*", "v1x"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S2", "]"}], ".", "S2"}], "*", "v2x"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S3", "]"}], ".", "S3"}], "*", "v3x"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polynomial", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", "T", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"t", "*", 
       RowBox[{"(", 
        RowBox[{"SumSivi3", "-", "SumRivi3"}], ")"}]}], "+", "SumRivi3", "+", 
      
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"t", "*", 
          RowBox[{"(", 
           RowBox[{"S4TS4", "-", "R4TR4"}], ")"}]}], "+", "R4TR4"}], ")"}], 
       "*", "v4x"}]}], ")"}], " ", ".", "T"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polynomial", "=", 
   RowBox[{"polynomial", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";", 
  RowBox[{"polynomial", "=", 
   RowBox[{"polynomial", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"dd", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "0"}], "]"}]}], ";", 
  RowBox[{"cc", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "1"}], "]"}]}], ";", 
  RowBox[{"bb", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "2"}], "]"}]}], ";", 
  RowBox[{"aa", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "3"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"dd", "=", 
   RowBox[{"FullSimplify", "[", "dd", "]"}]}], ";", 
  RowBox[{"bb", "=", 
   RowBox[{"FullSimplify", "[", "bb", "]"}]}], ";", 
  RowBox[{"cc", "=", 
   RowBox[{"FullSimplify", "[", "cc", "]"}]}], ";", 
  RowBox[{"aa", "=", 
   RowBox[{"FullSimplify", "[", "aa", "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"sx", "=", 
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"ax", "\[Equal]", "aa"}], "&&", 
      RowBox[{"bx", "\[Equal]", "bb"}], "&&", 
      RowBox[{"cx", "\[Equal]", "cc"}], "&&", 
      RowBox[{"dx", "\[Equal]", "dd"}]}], ",", 
     RowBox[{"{", 
      RowBox[{"v1x", ",", "v2x", ",", "v3x", ",", "v4x"}], "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww", ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SumRivi3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R1", "]"}], ".", "R1"}], "*", "v1y"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R2", "]"}], ".", "R2"}], "*", "v2y"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R3", "]"}], ".", "R3"}], "*", "v3y"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SumSivi3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S1", "]"}], ".", "S1"}], "*", "v1y"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S2", "]"}], ".", "S2"}], "*", "v2y"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S3", "]"}], ".", "S3"}], "*", "v3y"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polynomial", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", "T", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"t", "*", 
       RowBox[{"(", 
        RowBox[{"SumSivi3", "-", "SumRivi3"}], ")"}]}], "+", "SumRivi3", "+", 
      
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"t", "*", 
          RowBox[{"(", 
           RowBox[{"S4TS4", "-", "R4TR4"}], ")"}]}], "+", "R4TR4"}], ")"}], 
       "*", "v4y"}]}], ")"}], " ", ".", "T"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polynomial", "=", 
   RowBox[{"polynomial", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";", 
  RowBox[{"polynomial", "=", 
   RowBox[{"polynomial", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"dd", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "0"}], "]"}]}], ";", 
  RowBox[{"cc", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "1"}], "]"}]}], ";", 
  RowBox[{"bb", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "2"}], "]"}]}], ";", 
  RowBox[{"aa", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "3"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"dd", "=", 
   RowBox[{"FullSimplify", "[", "dd", "]"}]}], ";", 
  RowBox[{"bb", "=", 
   RowBox[{"FullSimplify", "[", "bb", "]"}]}], ";", 
  RowBox[{"cc", "=", 
   RowBox[{"FullSimplify", "[", "cc", "]"}]}], ";", 
  RowBox[{"aa", "=", 
   RowBox[{"FullSimplify", "[", "aa", "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"sy", "=", 
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"ay", "\[Equal]", "aa"}], "&&", 
      RowBox[{"by", "\[Equal]", "bb"}], "&&", 
      RowBox[{"cy", "\[Equal]", "cc"}], "&&", 
      RowBox[{"dy", "\[Equal]", "dd"}]}], ",", 
     RowBox[{"{", 
      RowBox[{"v1y", ",", "v2y", ",", "v3y", ",", "v4y"}], "}"}]}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww", ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SumRivi3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R1", "]"}], ".", "R1"}], "*", "v1z"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R2", "]"}], ".", "R2"}], "*", "v2z"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "R3", "]"}], ".", "R3"}], "*", "v3z"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"SumSivi3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S1", "]"}], ".", "S1"}], "*", "v1z"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S2", "]"}], ".", "S2"}], "*", "v2z"}], "+", 
    RowBox[{
     RowBox[{
      RowBox[{"Transpose", "[", "S3", "]"}], ".", "S3"}], "*", "v3z"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polynomial", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", "T", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"t", "*", 
       RowBox[{"(", 
        RowBox[{"SumSivi3", "-", "SumRivi3"}], ")"}]}], "+", "SumRivi3", "+", 
      
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"t", "*", 
          RowBox[{"(", 
           RowBox[{"S4TS4", "-", "R4TR4"}], ")"}]}], "+", "R4TR4"}], ")"}], 
       "*", "v4z"}]}], ")"}], " ", ".", "T"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polynomial", "=", 
   RowBox[{"polynomial", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";", 
  RowBox[{"polynomial", "=", 
   RowBox[{"polynomial", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"dd", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "0"}], "]"}]}], ";", 
  RowBox[{"cc", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "1"}], "]"}]}], ";", 
  RowBox[{"bb", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "2"}], "]"}]}], ";", 
  RowBox[{"aa", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"polynomial", ",", "t", ",", "3"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"dd", "=", 
   RowBox[{"FullSimplify", "[", "dd", "]"}]}], ";", 
  RowBox[{"bb", "=", 
   RowBox[{"FullSimplify", "[", "bb", "]"}]}], ";", 
  RowBox[{"cc", "=", 
   RowBox[{"FullSimplify", "[", "cc", "]"}]}], ";", 
  RowBox[{"aa", "=", 
   RowBox[{"FullSimplify", "[", "aa", "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"sz", "=", 
    RowBox[{"Solve", "[", 
     RowBox[{
      RowBox[{
       RowBox[{"az", "\[Equal]", "aa"}], "&&", 
       RowBox[{"bz", "\[Equal]", "bb"}], "&&", 
       RowBox[{"cz", "\[Equal]", "cc"}], "&&", 
       RowBox[{"dz", "\[Equal]", "dd"}]}], ",", 
      RowBox[{"{", 
       RowBox[{"v1z", ",", "v2z", ",", "v3z", ",", "v4z"}], "}"}]}], "]"}]}], 
   ";"}], "\[IndentingNewLine]", "\[IndentingNewLine]", "\[IndentingNewLine]",
   "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.792433841913527*^9, 3.792433882590333*^9}, {
   3.792434770938624*^9, 3.792435002891844*^9}, {3.792435047425043*^9, 
   3.7924351871738663`*^9}, {3.792435244286643*^9, 3.792435442467475*^9}, {
   3.7924355265552273`*^9, 3.7924355712507133`*^9}, {3.792435607931287*^9, 
   3.792435678903282*^9}, {3.792435718387941*^9, 3.792435726091772*^9}, {
   3.792435809392187*^9, 3.792435854324037*^9}, {3.792435887077148*^9, 
   3.792435912188054*^9}, {3.7924359445358067`*^9, 3.792435948204404*^9}, {
   3.792436001712407*^9, 3.792436114708818*^9}, {3.79243721358685*^9, 
   3.792437227332314*^9}, {3.792437311992168*^9, 3.79243732418615*^9}, {
   3.7924378715050783`*^9, 3.792437878806972*^9}, 3.792438558275345*^9, {
   3.792438660008746*^9, 3.792438662373289*^9}, {3.7924397326276073`*^9, 
   3.792440109951457*^9}, {3.792440265392562*^9, 3.7924402677646503`*^9}, {
   3.792491136274045*^9, 3.7924912337080507`*^9}, {3.7924916885679502`*^9, 
   3.7924917363291607`*^9}, {3.7949397173739862`*^9, 
   3.794939717629479*^9}},ExpressionUUID->"63c6debf-21ad-47c6-9f59-\
477455df2d4b"],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.7924913561664867`*^9, 3.792491360170664*^9}, 
   3.7924921647205973`*^9},ExpressionUUID->"a8d1777d-498c-4af3-82eb-\
736f74712c3b"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"cost", "=", 
   RowBox[{"Det", "[", 
    RowBox[{"(", GridBox[{
       {"v1x", "v2x", "v3x", "v4x"},
       {"v1y", "v2y", "v3y", "v4y"},
       {"v1z", "v2z", "v3z", "v4z"},
       {"1", "1", "1", "1"}
      }], ")"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"cost", "=", 
   RowBox[{"cost", "/.", 
    RowBox[{"sx", "[", 
     RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"cost", "=", 
   RowBox[{"cost", "/.", 
    RowBox[{"sy", "[", 
     RowBox[{"[", "1", "]"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"cost", "=", 
   RowBox[{"cost", "/.", 
    RowBox[{"sz", "[", 
     RowBox[{"[", "1", "]"}], "]"}]}]}], 
  ";"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.7924379224206448`*^9, 3.792437958234531*^9}, 
   3.792439700241311*^9, {3.792440134325617*^9, 3.7924401811196947`*^9}, {
   3.792440221506443*^9, 3.792440257777424*^9}, {3.792440363004504*^9, 
   3.792440366280102*^9}, {3.792440503088797*^9, 3.792440503350728*^9}, {
   3.792440561884652*^9, 3.7924405621464863`*^9}},
 CellLabel->"In[65]:=",ExpressionUUID->"0ad9f8f6-12ec-4454-850d-d84ec7303948"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"\[IndentingNewLine]", "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"w1", "=", 
     RowBox[{"(", GridBox[{
        {"w111", "w112"},
        {"w112", "w122"}
       }], ")"}]}], ";", 
    RowBox[{"w2", "=", 
     RowBox[{"(", GridBox[{
        {"w211", "w212"},
        {"w212", "w222"}
       }], ")"}]}], ";", 
    RowBox[{"w3", "=", 
     RowBox[{"(", GridBox[{
        {"w311", "w312"},
        {"w312", "w322"}
       }], ")"}]}], ";", 
    RowBox[{"w4", "=", 
     RowBox[{"(", GridBox[{
        {"w411", "w412"},
        {"w412", "w422"}
       }], ")"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"v1", "=", 
     RowBox[{"(", GridBox[{
        {"v111", "v112"},
        {"v112", "v122"}
       }], ")"}]}], ";", 
    RowBox[{"v2", "=", 
     RowBox[{"(", GridBox[{
        {"v211", "v212"},
        {"v212", "v222"}
       }], ")"}]}], ";", 
    RowBox[{"v3", "=", 
     RowBox[{"(", GridBox[{
        {"v311", "v312"},
        {"v312", "v322"}
       }], ")"}]}], ";", 
    RowBox[{"v4", "=", 
     RowBox[{"(", GridBox[{
        {"v411", "v412"},
        {"v412", "v422"}
       }], ")"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"c", "=", 
     RowBox[{
     "w1", "+", "w2", "+", "w3", "+", "w4", "-", "v1", "-", "v2", "-", "v3", 
      "-", "v4"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"d", "=", 
     RowBox[{"v1", "+", "v2", "+", "v3", "+", "v4"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"As", "=", 
     RowBox[{"(", GridBox[{
        {
         RowBox[{"w122", "-", "v122"}], 
         RowBox[{"w222", "-", "v222"}], 
         RowBox[{"w322", "-", "v322"}]},
        {
         RowBox[{
          RowBox[{
           RowBox[{"-", "2"}], "v112"}], "+", "v122", "+", 
          RowBox[{"2", "*", "w112"}]}], 
         RowBox[{
          RowBox[{
           RowBox[{"-", "2"}], "v212"}], "+", "v222", "+", 
          RowBox[{"2", "*", "w212"}]}], 
         RowBox[{
          RowBox[{
           RowBox[{"-", "2"}], "v312"}], "+", "v322", "+", 
          RowBox[{"2", "*", "w312"}]}]},
        {
         RowBox[{
          RowBox[{"-", "v111"}], "+", 
          RowBox[{"2", "*", "v112"}], "+", "w111"}], 
         RowBox[{
          RowBox[{"-", "v211"}], "+", 
          RowBox[{"2", "*", "v212"}], "+", "w211"}], 
         RowBox[{
          RowBox[{"-", "v311"}], "+", 
          RowBox[{"2", "*", "v312"}], "+", "w311"}]}
       }], ")"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"detAs", "=", 
     RowBox[{"Det", "[", "As", "]"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{"Minimize", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{"-", "detAs"}], ",", 
       RowBox[{"w111", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{"w122", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"Det", "[", "w1", "]"}], "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"\\\[IndentingNewLine]", "w211"}], "\[GreaterEqual]", "0"}], 
       ",", 
       RowBox[{"w222", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"Det", "[", "w2", "]"}], "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"\\\[IndentingNewLine]", "w311"}], "\[GreaterEqual]", "0"}], 
       ",", 
       RowBox[{"w322", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"Det", "[", "w3", "]"}], "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"\\\[IndentingNewLine]", "w411"}], "\[GreaterEqual]", "0"}], 
       ",", 
       RowBox[{"w422", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"Det", "[", "w4", "]"}], "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"\\\[IndentingNewLine]", "v111"}], "\[GreaterEqual]", "0"}], 
       ",", 
       RowBox[{"v122", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"Det", "[", "v1", "]"}], "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"\\\[IndentingNewLine]", "v211"}], "\[GreaterEqual]", "0"}], 
       ",", 
       RowBox[{"v222", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"Det", "[", "v2", "]"}], "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"\\\[IndentingNewLine]", "v311"}], "\[GreaterEqual]", "0"}], 
       ",", 
       RowBox[{"v322", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"Det", "[", "v3", "]"}], "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"\\\[IndentingNewLine]", "v411"}], "\[GreaterEqual]", "0"}], 
       ",", 
       RowBox[{"v422", "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{"Det", "[", "v4", "]"}], "\[GreaterEqual]", "0"}], ",", 
       RowBox[{
        RowBox[{
         RowBox[{"\\\[IndentingNewLine]", "c"}], "[", 
         RowBox[{"[", 
          RowBox[{"2", ",", "2"}], "]"}], "]"}], "\[Equal]", "0"}], " ", ",", 
       
       RowBox[{
        RowBox[{
         RowBox[{
          RowBox[{"\\\[IndentingNewLine]", "2"}], "*", 
          RowBox[{"c", "[", 
           RowBox[{"[", 
            RowBox[{"1", ",", "2"}], "]"}], "]"}]}], "+", 
         RowBox[{"d", "[", 
          RowBox[{"[", 
           RowBox[{"2", ",", "2"}], "]"}], "]"}]}], "\[Equal]", "0"}], " ", 
       ",", 
       RowBox[{
        RowBox[{
         RowBox[{
          RowBox[{"\\\[IndentingNewLine]", "c"}], "[", 
          RowBox[{"[", 
           RowBox[{"1", ",", "1"}], "]"}], "]"}], "+", 
         RowBox[{"2", "*", 
          RowBox[{"d", "[", 
           RowBox[{"[", 
            RowBox[{"1", ",", "2"}], "]"}], "]"}]}]}], "\[Equal]", "0"}], " ",
        ",", 
       RowBox[{
        RowBox[{
         RowBox[{"\\\[IndentingNewLine]", "d"}], "[", 
         RowBox[{"[", 
          RowBox[{"1", ",", "1"}], "]"}], "]"}], "\[Equal]", "1"}]}], "  ", 
      "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "w111", ",", "w112", ",", "w122", ",", "w211", ",", "w212", ",", "w222",
        ",", "w311", ",", "w312", ",", "w322", ",", "w411", ",", "w412", ",", 
       "w422", ",", "v111", ",", "v112", ",", "v122", ",", "v211", ",", 
       "v212", ",", "v222", ",", "v311", ",", "v312", ",", "v322", ",", 
       "v411", ",", "v412", ",", "v422"}], "}"}]}], "]"}]}]}]], "Input",
 CellChangeTimes->{{3.792440619258169*^9, 3.7924407796404467`*^9}, {
   3.7924408156141*^9, 3.792440854173624*^9}, {3.7924912504555683`*^9, 
   3.792491290721895*^9}, {3.7931272548461523`*^9, 3.7931272613547115`*^9}, {
   3.7931274069601345`*^9, 3.793127511112133*^9}, {3.7931275701388736`*^9, 
   3.793127827200612*^9}, {3.7931278726473665`*^9, 3.793127921845955*^9}, {
   3.793127995503897*^9, 3.7931282057051525`*^9}, 3.793128607984213*^9, 
   3.793128659258603*^9, 3.793129121516529*^9, {3.7931291640397625`*^9, 
   3.793129178453571*^9}, {3.7931292486989965`*^9, 3.7931292655439005`*^9}, 
   3.793129319862567*^9},
 CellLabel->"In[25]:=",ExpressionUUID->"d8037bad-59ac-48e7-9dc4-5c1de60656f2"],

Cell[BoxData[
 TemplateBox[{
  "NMinimize", "incst", 
   "\"\\!\\(\\*RowBox[{\\\"NMinimize\\\"}]\\) was unable to generate any \
initial points satisfying the inequality constraints \\!\\(\\*RowBox[{\\\"{\\\
\", RowBox[{RowBox[{RowBox[{SuperscriptBox[\\\"v312\\\", \\\"2\\\"], \
\\\"-\\\", RowBox[{\\\"v311\\\", \\\" \\\", \\\"v322\\\"}]}], \
\\\"\[LessEqual]\\\", \\\"0\\\"}], \\\",\\\", RowBox[{RowBox[{SuperscriptBox[\
\\\"v212\\\", \\\"2\\\"], \\\"-\\\", RowBox[{\\\"v222\\\", \\\" \\\", \
RowBox[{\\\"(\\\", RowBox[{RowBox[{\\\"0.9999999999999998`\\\", \\\"\
\[VeryThinSpace]\\\"}], \\\"-\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v111\\\
\"}], \\\"-\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v311\\\"}], \\\"-\\\", \
RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v411\\\"}]}], \\\")\\\"}]}]}], \\\"\
\[LessEqual]\\\", \\\"0\\\"}], \\\",\\\", RowBox[{RowBox[{RowBox[{\\\"-\\\", \
\\\"0.9999999999999998`\\\"}], \\\"+\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \
\\\"v111\\\"}], \\\"+\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v311\\\"}], \\\
\"+\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v411\\\"}]}], \\\"\[LessEqual]\\\
\", \\\"0\\\"}], \\\",\\\", RowBox[{RowBox[{SuperscriptBox[\\\"v412\\\", \
\\\"2\\\"], \\\"-\\\", RowBox[{\\\"v411\\\", \\\" \\\", \\\"v422\\\"}]}], \
\\\"\[LessEqual]\\\", \\\"0\\\"}], \\\",\\\", RowBox[{RowBox[{SuperscriptBox[\
\\\"w212\\\", \\\"2\\\"], \\\"-\\\", RowBox[{\\\"w211\\\", \\\" \\\", \
\\\"w222\\\"}]}], \\\"\[LessEqual]\\\", \\\"0\\\"}], \\\",\\\", \
RowBox[{RowBox[{SuperscriptBox[\\\"w312\\\", \\\"2\\\"], \\\"-\\\", \
RowBox[{\\\"w311\\\", \\\" \\\", \\\"w322\\\"}]}], \\\"\[LessEqual]\\\", \
\\\"0\\\"}], \\\",\\\", RowBox[{RowBox[{RowBox[{RowBox[{\\\"-\\\", \\\"v111\\\
\"}], \\\" \\\", \\\"v122\\\"}], \\\"+\\\", SuperscriptBox[RowBox[{\\\"(\\\", \
RowBox[{\\\"\[LeftSkeleton]\\\", \\\"1\\\", \\\"\[RightSkeleton]\\\"}], \\\")\
\\\"}], \\\"2\\\"]}], \\\"\[LessEqual]\\\", \\\"0\\\"}], \\\",\\\", \
RowBox[{RowBox[{SuperscriptBox[RowBox[{\\\"(\\\", RowBox[{\\\"\[LeftSkeleton]\
\\\", \\\"1\\\", \\\"\[RightSkeleton]\\\"}], \\\")\\\"}], \\\"2\\\"], \\\"-\\\
\", RowBox[{\\\"w111\\\", \\\" \\\", RowBox[{\\\"(\\\", \
RowBox[{RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v122\\\"}], \\\"+\\\", RowBox[{\\\
\"1.`\\\", \\\" \\\", \\\"v222\\\"}], \\\"+\\\", RowBox[{\\\"1.`\\\", \\\" \\\
\", \\\"v322\\\"}], \\\"+\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \
\\\"v422\\\"}], \\\"-\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \\\"w222\\\"}], \\\
\"-\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \\\"w322\\\"}], \\\"-\\\", \
RowBox[{\\\"1.`\\\", \\\" \\\", \\\"w422\\\"}]}], \\\")\\\"}]}]}], \\\"\
\[LessEqual]\\\", \\\"0\\\"}], \\\",\\\", \
RowBox[{RowBox[{RowBox[{RowBox[{\\\"-\\\", \\\"1.`\\\"}], \\\" \\\", \\\"v122\
\\\"}], \\\"-\\\", RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v222\\\"}], \\\"-\\\", \
RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v322\\\"}], \\\"-\\\", \
RowBox[{\\\"1.`\\\", \\\" \\\", \\\"v422\\\"}], \\\"+\\\", \
RowBox[{\\\"1.`\\\", \\\" \\\", \\\"w222\\\"}], \\\"+\\\", \
RowBox[{\\\"1.`\\\", \\\" \\\", \\\"w322\\\"}], \\\"+\\\", \
RowBox[{\\\"1.`\\\", \\\" \\\", \\\"w422\\\"}]}], \\\"\[LessEqual]\\\", \\\"0\
\\\"}], \\\",\\\", RowBox[{RowBox[{SuperscriptBox[\\\"w412\\\", \\\"2\\\"], \
\\\"-\\\", RowBox[{\\\"w411\\\", \\\" \\\", \\\"w422\\\"}]}], \
\\\"\[LessEqual]\\\", \\\"0\\\"}]}], \\\"}\\\"}]\\). The initial region \
specified may not contain any feasible points. Changing the initial region or \
specifying explicit initial points may provide a better solution.\"", 2, 24, 
   4, 23521413421211557455, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{
  3.793128665305441*^9, {3.793129254737811*^9, 3.793129299160956*^9}},
 CellLabel->
  "During evaluation of \
In[17]:=",ExpressionUUID->"be97aa52-d3db-4619-95b3-7ec0e2331284"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"-", "6.928788533999487`"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"w111", "\[Rule]", "2.31030059473849`"}], ",", 
     RowBox[{"w112", "\[Rule]", 
      RowBox[{"-", "3.235090624940229`"}]}], ",", 
     RowBox[{"w122", "\[Rule]", "4.530064778328438`"}], ",", 
     RowBox[{"w211", "\[Rule]", "0.017493855636055617`"}], ",", 
     RowBox[{"w212", "\[Rule]", "0.08694002279532463`"}], ",", 
     RowBox[{"w222", "\[Rule]", "0.4320698490312298`"}], ",", 
     RowBox[{"w311", "\[Rule]", "0.7340286582588311`"}], ",", 
     RowBox[{"w312", "\[Rule]", 
      RowBox[{"-", "0.6693208019561816`"}]}], ",", 
     RowBox[{"w322", "\[Rule]", "0.6103172279321238`"}], ",", 
     RowBox[{"w411", "\[Rule]", "0.022549650444700937`"}], ",", 
     RowBox[{"w412", "\[Rule]", 
      RowBox[{"-", "0.026430327576067402`"}]}], ",", 
     RowBox[{"w422", "\[Rule]", "0.030978848984436834`"}], ",", 
     RowBox[{"v111", "\[Rule]", "3.45200753338242`*^-7"}], ",", 
     RowBox[{"v112", "\[Rule]", 
      RowBox[{"-", "2.0054887845954994`*^-6"}]}], ",", 
     RowBox[{"v122", "\[Rule]", "0.000011651148558257276`"}], ",", 
     RowBox[{"v211", "\[Rule]", "0.06816825407729277`"}], ",", 
     RowBox[{"v212", "\[Rule]", 
      RowBox[{"-", "0.3954765518273766`"}]}], ",", 
     RowBox[{"v222", "\[Rule]", "2.2943480827297154`"}], ",", 
     RowBox[{"v311", "\[Rule]", "0.09985133810042918`"}], ",", 
     RowBox[{"v312", "\[Rule]", "0.43567218434155575`"}], ",", 
     RowBox[{"v322", "\[Rule]", "1.9009284784746094`"}], ",", 
     RowBox[{"v411", "\[Rule]", "0.8319800626215246`"}], ",", 
     RowBox[{"v412", "\[Rule]", 
      RowBox[{"-", "1.0823800065644336`"}]}], ",", 
     RowBox[{"v422", "\[Rule]", "1.408142491923345`"}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.7931281536573486`*^9, 3.793128189061596*^9}, 
   3.7931286654580336`*^9, {3.793129254892398*^9, 3.7931293038255067`*^9}},
 CellLabel->"Out[24]=",ExpressionUUID->"bfa7cdba-b2f5-4f24-80f4-1c81b7c99e29"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"W", "=", 
   RowBox[{"(", GridBox[{
      {"w11", "w12"},
      {"w12", "w22"}
     }], ")"}]}], ";", 
  RowBox[{"V", "=", 
   RowBox[{"(", GridBox[{
      {"v11", "v12"},
      {"v12", "v22"}
     }], ")"}]}], ";", 
  RowBox[{"T", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polynomial", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", "T", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"t", "*", "W"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "t"}], ")"}], "*", "V"}]}], ")"}], " ", ".", 
    "T"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"dd", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polynomial", ",", "t", ",", "0"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"cc", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polynomial", ",", "t", ",", "1"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"bb", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polynomial", ",", "t", ",", "2"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"aa", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polynomial", ",", "t", ",", "3"}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.79277808122757*^9, 3.79277820647023*^9}},
 CellLabel->"In[1]:=",ExpressionUUID->"52a815ea-18b2-4465-8553-bf583ed6d2d2"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", "v11", "}"}], "}"}]], "Output",
 CellChangeTimes->{3.792778207435663*^9, 3.795167458700674*^9},
 CellLabel->"Out[4]=",ExpressionUUID->"ee1df760-c176-465b-b4b2-c2a18024bf0d"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", "v11"}], "+", 
    RowBox[{"2", " ", "v12"}], "+", "w11"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.792778207435663*^9, 3.795167458706143*^9},
 CellLabel->"Out[5]=",ExpressionUUID->"c1734cd7-f26c-4a71-af6c-3785eab3da9d"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     RowBox[{"-", "2"}], " ", "v12"}], "+", "v22", "+", 
    RowBox[{"2", " ", "w12"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.792778207435663*^9, 3.795167458710634*^9},
 CellLabel->"Out[6]=",ExpressionUUID->"26eebccd-f0c8-46a5-9369-50524c8b0018"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", "v22"}], "+", "w22"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.792778207435663*^9, 3.795167458714699*^9},
 CellLabel->"Out[7]=",ExpressionUUID->"6a7c20a8-b4d0-47ff-844d-9be1e2b4b51f"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"V", "=", 
     RowBox[{"(", GridBox[{
        {"v11", "v12"},
        {"v12", "v22"}
       }], ")"}]}], ";", 
    RowBox[{"c", "=", 
     RowBox[{"(", GridBox[{
        {"c11", "c12"},
        {"c21", "c22"},
        {"c31", "c32"},
        {"c41", "c42"}
       }], ")"}]}], ";", 
    RowBox[{"d", "=", 
     RowBox[{"(", GridBox[{
        {"d11"},
        {"d21"}
       }], ")"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"c", ".", "V", ".", "d"}], "//", "MatrixForm"}], 
   "\[IndentingNewLine]", 
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"LogicalExpand", "[", 
       RowBox[{
        RowBox[{"c", ".", "V", ".", "d"}], "==", 
        RowBox[{"(", GridBox[{
           {
            RowBox[{"-", "v22"}]},
           {
            RowBox[{
             RowBox[{
              RowBox[{"-", "2"}], "*", "v12"}], "+", "v22"}]},
           {
            RowBox[{
             RowBox[{"-", "v11"}], "+", 
             RowBox[{"2", "*", "v12"}]}]},
           {"v11"}
          }], ")"}]}], "]"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "c11", ",", " ", "c12", ",", " ", "c21", ",", " ", "c22", ",", " ", 
       "c31", ",", " ", "c32", ",", " ", "c41", ",", " ", "c42", ",", " ", 
       "d11", ",", " ", "d21"}], "}"}]}], "]"}]}]}]], "Input",
 CellChangeTimes->{{3.793999274762712*^9, 3.7939994220543175`*^9}, {
  3.793999465371334*^9, 3.793999729052593*^9}, {3.793999786339488*^9, 
  3.793999791239172*^9}, {3.7939998845749807`*^9, 3.7939998994608226`*^9}, {
  3.793999967901477*^9, 3.793999981566054*^9}, {3.79400002161523*^9, 
  3.7940000264852448`*^9}, {3.7940002522275743`*^9, 3.794000272990732*^9}, {
  3.794000378901768*^9, 3.7940003940521355`*^9}, {3.794000479159582*^9, 
  3.7940005042539186`*^9}},
 CellLabel->"In[1]:=",ExpressionUUID->"d05ca2f6-ecd3-4bad-bbbd-3907257cacf0"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"d11", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"c11", " ", "v11"}], "+", 
          RowBox[{"c12", " ", "v12"}]}], ")"}]}], "+", 
       RowBox[{"d21", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"c11", " ", "v12"}], "+", 
          RowBox[{"c12", " ", "v22"}]}], ")"}]}]}]},
     {
      RowBox[{
       RowBox[{"d11", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"c21", " ", "v11"}], "+", 
          RowBox[{"c22", " ", "v12"}]}], ")"}]}], "+", 
       RowBox[{"d21", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"c21", " ", "v12"}], "+", 
          RowBox[{"c22", " ", "v22"}]}], ")"}]}]}]},
     {
      RowBox[{
       RowBox[{"d11", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"c31", " ", "v11"}], "+", 
          RowBox[{"c32", " ", "v12"}]}], ")"}]}], "+", 
       RowBox[{"d21", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"c31", " ", "v12"}], "+", 
          RowBox[{"c32", " ", "v22"}]}], ")"}]}]}]},
     {
      RowBox[{
       RowBox[{"d11", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"c41", " ", "v11"}], "+", 
          RowBox[{"c42", " ", "v12"}]}], ")"}]}], "+", 
       RowBox[{"d21", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"c41", " ", "v12"}], "+", 
          RowBox[{"c42", " ", "v22"}]}], ")"}]}]}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.7939994100612907`*^9, 3.793999422626912*^9}, 
   3.7939995068037047`*^9, 3.793999546011059*^9, {3.793999596897108*^9, 
   3.7939997296101055`*^9}, 3.7939997914954877`*^9, {3.793999892378665*^9, 
   3.793999900154968*^9}, {3.794000027061011*^9, 3.7940000302494555`*^9}, {
   3.7940002552513404`*^9, 3.794000273380721*^9}, {3.7940003795839596`*^9, 
   3.794000394408203*^9}, {3.7940004894604616`*^9, 3.7940005074623795`*^9}},
 CellLabel->
  "Out[3]//MatrixForm=",ExpressionUUID->"290ef782-9b58-482f-9ae5-\
d91456c1df73"],

Cell[BoxData[
 TemplateBox[{
  "Solve", "svars", 
   "\"Equations may not give solutions for all \\\"solve\\\" variables.\"", 2,
    4, 1, 23527123285137569148, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{3.794000507814439*^9},
 CellLabel->
  "During evaluation of \
In[1]:=",ExpressionUUID->"a187f26a-07e4-4303-8308-9670a8d2a20e"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"c12", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{"-", "c11"}], " ", "d11", " ", "v11"}], "-", 
        RowBox[{"c11", " ", "d21", " ", "v12"}], "-", "v22"}], 
       RowBox[{
        RowBox[{"d11", " ", "v12"}], "+", 
        RowBox[{"d21", " ", "v22"}]}]]}], ",", 
     RowBox[{"c22", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{"-", "c21"}], " ", "d11", " ", "v11"}], "-", 
        RowBox[{"2", " ", "v12"}], "-", 
        RowBox[{"c21", " ", "d21", " ", "v12"}], "+", "v22"}], 
       RowBox[{
        RowBox[{"d11", " ", "v12"}], "+", 
        RowBox[{"d21", " ", "v22"}]}]]}], ",", 
     RowBox[{"c32", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{"-", "v11"}], "-", 
        RowBox[{"c31", " ", "d11", " ", "v11"}], "+", 
        RowBox[{"2", " ", "v12"}], "-", 
        RowBox[{"c31", " ", "d21", " ", "v12"}]}], 
       RowBox[{
        RowBox[{"d11", " ", "v12"}], "+", 
        RowBox[{"d21", " ", "v22"}]}]]}], ",", 
     RowBox[{"c42", "\[Rule]", 
      FractionBox[
       RowBox[{
        FractionBox[
         RowBox[{"c11", " ", "v11", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "v11"}], "-", 
            RowBox[{"c31", " ", "d11", " ", "v11"}], "+", 
            RowBox[{"2", " ", "v12"}], "-", 
            RowBox[{"c31", " ", "d21", " ", "v12"}]}], ")"}]}], 
         RowBox[{
          RowBox[{"d11", " ", "v12"}], "+", 
          RowBox[{"d21", " ", "v22"}]}]], "-", 
        FractionBox[
         RowBox[{"c31", " ", "v11", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"-", "c11"}], " ", "d11", " ", "v11"}], "-", 
            RowBox[{"c11", " ", "d21", " ", "v12"}], "-", "v22"}], ")"}]}], 
         RowBox[{
          RowBox[{"d11", " ", "v12"}], "+", 
          RowBox[{"d21", " ", "v22"}]}]], "-", 
        FractionBox[
         RowBox[{"c41", " ", "v11", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"-", "c11"}], " ", "d11", " ", "v11"}], "-", 
            RowBox[{"c11", " ", "d21", " ", "v12"}], "-", "v22"}], ")"}]}], 
         RowBox[{
          RowBox[{"d11", " ", "v12"}], "+", 
          RowBox[{"d21", " ", "v22"}]}]], "+", 
        FractionBox[
         RowBox[{"2", " ", "c41", " ", "v12", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"-", "c11"}], " ", "d11", " ", "v11"}], "-", 
            RowBox[{"c11", " ", "d21", " ", "v12"}], "-", "v22"}], ")"}]}], 
         RowBox[{
          RowBox[{"d11", " ", "v12"}], "+", 
          RowBox[{"d21", " ", "v22"}]}]], "+", 
        FractionBox[
         RowBox[{"c41", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", "v11"}], "-", 
            RowBox[{"c31", " ", "d11", " ", "v11"}], "+", 
            RowBox[{"2", " ", "v12"}], "-", 
            RowBox[{"c31", " ", "d21", " ", "v12"}]}], ")"}], " ", "v22"}], 
         RowBox[{
          RowBox[{"d11", " ", "v12"}], "+", 
          RowBox[{"d21", " ", "v22"}]}]]}], 
       RowBox[{
        RowBox[{
         RowBox[{"-", "c11"}], " ", "v11"}], "+", 
        RowBox[{"2", " ", "c11", " ", "v12"}], "+", 
        RowBox[{"c31", " ", "v22"}]}]]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"c12", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{"-", "c11"}], " ", "d11", " ", "v11"}], "-", 
        RowBox[{"c11", " ", "d21", " ", "v12"}], "-", "v22"}], 
       RowBox[{
        RowBox[{"d11", " ", "v12"}], "+", 
        RowBox[{"d21", " ", "v22"}]}]]}], ",", 
     RowBox[{"c22", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{
         RowBox[{"-", "c21"}], " ", "d11", " ", "v11"}], "-", 
        RowBox[{"2", " ", "v12"}], "-", 
        RowBox[{"c21", " ", "d21", " ", "v12"}], "+", "v22"}], 
       RowBox[{
        RowBox[{"d11", " ", "v12"}], "+", 
        RowBox[{"d21", " ", "v22"}]}]]}], ",", 
     RowBox[{"c31", "\[Rule]", 
      FractionBox[
       RowBox[{"c11", " ", 
        RowBox[{"(", 
         RowBox[{"v11", "-", 
          RowBox[{"2", " ", "v12"}]}], ")"}]}], "v22"]}], ",", 
     RowBox[{"c32", "\[Rule]", 
      RowBox[{"-", 
       FractionBox[
        RowBox[{
         RowBox[{"(", 
          RowBox[{"v11", "-", 
           RowBox[{"2", " ", "v12"}]}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{"c11", " ", "d11", " ", "v11"}], "+", 
           RowBox[{"c11", " ", "d21", " ", "v12"}], "+", "v22"}], ")"}]}], 
        RowBox[{"v22", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{"d11", " ", "v12"}], "+", 
           RowBox[{"d21", " ", "v22"}]}], ")"}]}]]}]}], ",", 
     RowBox[{"c42", "\[Rule]", 
      FractionBox[
       RowBox[{"v11", "-", 
        RowBox[{"c41", " ", "d11", " ", "v11"}], "-", 
        RowBox[{"c41", " ", "d21", " ", "v12"}]}], 
       RowBox[{
        RowBox[{"d11", " ", "v12"}], "+", 
        RowBox[{"d21", " ", "v22"}]}]]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"c11", "\[Rule]", 
      FractionBox[
       SuperscriptBox["v22", "2"], 
       RowBox[{"d11", " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["v12", "2"], "-", 
          RowBox[{"v11", " ", "v22"}]}], ")"}]}]]}], ",", 
     RowBox[{"c21", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{"2", " ", "v12", " ", "v22"}], "-", 
        SuperscriptBox["v22", "2"]}], 
       RowBox[{"d11", " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["v12", "2"], "-", 
          RowBox[{"v11", " ", "v22"}]}], ")"}]}]]}], ",", 
     RowBox[{"c31", "\[Rule]", 
      FractionBox[
       RowBox[{
        RowBox[{"v11", " ", "v22"}], "-", 
        RowBox[{"2", " ", "v12", " ", "v22"}]}], 
       RowBox[{"d11", " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["v12", "2"], "-", 
          RowBox[{"v11", " ", "v22"}]}], ")"}]}]]}], ",", 
     RowBox[{"c41", "\[Rule]", 
      FractionBox[
       RowBox[{"v11", " ", "v22"}], 
       RowBox[{"d11", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", 
           SuperscriptBox["v12", "2"]}], "+", 
          RowBox[{"v11", " ", "v22"}]}], ")"}]}]]}], ",", 
     RowBox[{"d21", "\[Rule]", 
      RowBox[{"-", 
       FractionBox[
        RowBox[{"d11", " ", "v12"}], "v22"]}]}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.7939994100612907`*^9, 3.793999422626912*^9}, 
   3.7939995068037047`*^9, 3.793999546011059*^9, {3.793999596897108*^9, 
   3.7939997296101055`*^9}, 3.7939997914954877`*^9, {3.793999892378665*^9, 
   3.793999900154968*^9}, {3.794000027061011*^9, 3.7940000302494555`*^9}, {
   3.7940002552513404`*^9, 3.794000273380721*^9}, {3.7940003795839596`*^9, 
   3.794000394408203*^9}, {3.7940004894604616`*^9, 3.7940005078573494`*^9}},
 CellLabel->"Out[4]=",ExpressionUUID->"45fe60ba-40fe-468e-9874-ce72e7e76921"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"W", "=", 
   RowBox[{"(", GridBox[{
      {"w11", "w12", "w13"},
      {"w12", "w22", "w23"},
      {"w13", "w23", "w33"}
     }], ")"}]}], ";", 
  RowBox[{"V", "=", 
   RowBox[{"(", GridBox[{
      {"v11", "v12"},
      {"v12", "v22"}
     }], ")"}]}], ";", 
  RowBox[{"T", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"}
     }], ")"}]}], ";", 
  RowBox[{"T2", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"},
      {
       SuperscriptBox["t", "2"]}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polGrado4", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"Transpose", "[", "T2", "]"}], ".", "W", ".", "T2"}], "+", 
    RowBox[{"t", "*", 
     RowBox[{"(", 
      RowBox[{"1", "-", "t"}], ")"}], "*", 
     RowBox[{
      RowBox[{"Transpose", "[", "T", "]"}], ".", "V", " ", ".", "T"}]}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"c4", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado4", ",", "t", ",", "4"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c3", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado4", ",", "t", ",", "3"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c2", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado4", ",", "t", ",", "2"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c1", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado4", ",", "t", ",", "1"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c0", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado4", ",", "t", ",", "0"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c0", "+", "c1", "+", "c2", "+", "c3", "+", "c4"}]}], "Input",
 CellChangeTimes->{{3.793203886839641*^9, 3.793203959590221*^9}, {
  3.7932044997044106`*^9, 3.79320453639128*^9}, {3.7932048898046303`*^9, 
  3.7932048973243103`*^9}, {3.793298234458066*^9, 3.7932982384658146`*^9}, {
  3.7933006557727985`*^9, 3.793300725758795*^9}, {3.7933008345006905`*^9, 
  3.7933008656012897`*^9}, {3.7933009140934477`*^9, 3.793300949488943*^9}, {
  3.793304789384878*^9, 3.7933047906315117`*^9}},
 CellLabel->"In[84]:=",ExpressionUUID->"8f4f05df-2493-4ee0-920e-b6e535f6509c"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", "v22"}], "+", "w33"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7932040052638893`*^9, 3.7932044762805886`*^9, 3.7932045410428066`*^9, 
   3.793204898526066*^9, 3.79328688856594*^9, 3.7932982394212275`*^9, {
   3.7933008588822207`*^9, 3.793300866213787*^9}, 3.793300914667915*^9, 
   3.793300950231927*^9, 3.7933047920975885`*^9},
 CellLabel->"Out[87]=",ExpressionUUID->"d9f5aac2-2fc9-49ed-8346-d296073b6472"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     RowBox[{"-", "2"}], " ", "v12"}], "+", "v22", "+", 
    RowBox[{"2", " ", "w23"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7932040052638893`*^9, 3.7932044762805886`*^9, 3.7932045410428066`*^9, 
   3.793204898526066*^9, 3.79328688856594*^9, 3.7932982394212275`*^9, {
   3.7933008588822207`*^9, 3.793300866213787*^9}, 3.793300914667915*^9, 
   3.793300950231927*^9, 3.793304792101609*^9},
 CellLabel->"Out[88]=",ExpressionUUID->"b70d5a6c-1bd4-4fac-8102-d56f744fd3f9"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", "v11"}], "+", 
    RowBox[{"2", " ", "v12"}], "+", 
    RowBox[{"2", " ", "w13"}], "+", "w22"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7932040052638893`*^9, 3.7932044762805886`*^9, 3.7932045410428066`*^9, 
   3.793204898526066*^9, 3.79328688856594*^9, 3.7932982394212275`*^9, {
   3.7933008588822207`*^9, 3.793300866213787*^9}, 3.793300914667915*^9, 
   3.793300950231927*^9, 3.793304792106592*^9},
 CellLabel->"Out[89]=",ExpressionUUID->"a8a6725f-3a41-4857-a524-c11e1e623241"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"v11", "+", 
    RowBox[{"2", " ", "w12"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7932040052638893`*^9, 3.7932044762805886`*^9, 3.7932045410428066`*^9, 
   3.793204898526066*^9, 3.79328688856594*^9, 3.7932982394212275`*^9, {
   3.7933008588822207`*^9, 3.793300866213787*^9}, 3.793300914667915*^9, 
   3.793300950231927*^9, 3.7933047921105824`*^9},
 CellLabel->"Out[90]=",ExpressionUUID->"737b157a-5e53-4c9d-a90d-be9856e52c68"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", "w11", "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7932040052638893`*^9, 3.7932044762805886`*^9, 3.7932045410428066`*^9, 
   3.793204898526066*^9, 3.79328688856594*^9, 3.7932982394212275`*^9, {
   3.7933008588822207`*^9, 3.793300866213787*^9}, 3.793300914667915*^9, 
   3.793300950231927*^9, 3.793304792114544*^9},
 CellLabel->"Out[91]=",ExpressionUUID->"d7ab9904-cec2-4cf2-9a5f-6ea39e7caa35"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"w11", "+", 
    RowBox[{"2", " ", "w12"}], "+", 
    RowBox[{"2", " ", "w13"}], "+", "w22", "+", 
    RowBox[{"2", " ", "w23"}], "+", "w33"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7932040052638893`*^9, 3.7932044762805886`*^9, 3.7932045410428066`*^9, 
   3.793204898526066*^9, 3.79328688856594*^9, 3.7932982394212275`*^9, {
   3.7933008588822207`*^9, 3.793300866213787*^9}, 3.793300914667915*^9, 
   3.793300950231927*^9, 3.793304792118559*^9},
 CellLabel->"Out[92]=",ExpressionUUID->"f19f4a35-bf38-40a6-80f9-9d3f82d7e4cf"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"W", "=", 
   RowBox[{"(", GridBox[{
      {"w11", "w12", "w13"},
      {"w12", "w22", "w23"},
      {"w13", "w23", "w33"}
     }], ")"}]}], ";", 
  RowBox[{"V", "=", 
   RowBox[{"(", GridBox[{
      {"v11", "v12", "v13"},
      {"v12", "v22", "v23"},
      {"v13", "v23", "v33"}
     }], ")"}]}], ";", 
  RowBox[{"T2", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"},
      {
       SuperscriptBox["t", "2"]}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polGrado5", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", "T2", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"t", "*", "W"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "t"}], ")"}], "*", "V"}]}], ")"}], " ", ".", 
    "T2"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"c5", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado5", ",", "t", ",", "5"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c4", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado5", ",", "t", ",", "4"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c3", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado5", ",", "t", ",", "3"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c2", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado5", ",", "t", ",", "2"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c1", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado5", ",", "t", ",", "1"}], 
   "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c0", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polGrado5", ",", "t", ",", "0"}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.7933045558925743`*^9, 3.7933047604812717`*^9}, 
   3.793361775046686*^9, {3.7951682513850107`*^9, 
   3.795168296863345*^9}},ExpressionUUID->"e820a9a2-302e-44d7-837c-\
11b529b5edb6"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", "v33"}], "+", "w33"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7933046859641027`*^9, {3.7933047206188793`*^9, 3.7933047266324186`*^9}, 
   3.793304761023791*^9, {3.793361766453677*^9, 3.793361776066958*^9}, 
   3.795167678682334*^9},
 CellLabel->"Out[11]=",ExpressionUUID->"2f4c5bf1-7643-4635-b1ca-ffe7277cb383"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     RowBox[{"-", "2"}], " ", "v23"}], "+", "v33", "+", 
    RowBox[{"2", " ", "w23"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7933046859641027`*^9, {3.7933047206188793`*^9, 3.7933047266324186`*^9}, 
   3.793304761023791*^9, {3.793361766453677*^9, 3.793361776066958*^9}, 
   3.795167678684573*^9},
 CellLabel->"Out[12]=",ExpressionUUID->"b9946f6c-1571-4877-abc0-44e64f8e8aea"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     RowBox[{"-", "2"}], " ", "v13"}], "-", "v22", "+", 
    RowBox[{"2", " ", "v23"}], "+", 
    RowBox[{"2", " ", "w13"}], "+", "w22"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7933046859641027`*^9, {3.7933047206188793`*^9, 3.7933047266324186`*^9}, 
   3.793304761023791*^9, {3.793361766453677*^9, 3.793361776066958*^9}, 
   3.795167678685893*^9},
 CellLabel->"Out[13]=",ExpressionUUID->"f1d6426b-2f75-4138-b1f5-907b7c21014b"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     RowBox[{"-", "2"}], " ", "v12"}], "+", 
    RowBox[{"2", " ", "v13"}], "+", "v22", "+", 
    RowBox[{"2", " ", "w12"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7933046859641027`*^9, {3.7933047206188793`*^9, 3.7933047266324186`*^9}, 
   3.793304761023791*^9, {3.793361766453677*^9, 3.793361776066958*^9}, 
   3.795167678687213*^9},
 CellLabel->"Out[14]=",ExpressionUUID->"cadc5d1c-0417-452d-956c-1937857b5ef9"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", "v11"}], "+", 
    RowBox[{"2", " ", "v12"}], "+", "w11"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7933046859641027`*^9, {3.7933047206188793`*^9, 3.7933047266324186`*^9}, 
   3.793304761023791*^9, {3.793361766453677*^9, 3.793361776066958*^9}, 
   3.795167678688548*^9},
 CellLabel->"Out[15]=",ExpressionUUID->"6cf0f36c-0ad8-4de2-87c9-8edc736c97ce"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", "v11", "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7933046859641027`*^9, {3.7933047206188793`*^9, 3.7933047266324186`*^9}, 
   3.793304761023791*^9, {3.793361766453677*^9, 3.793361776066958*^9}, 
   3.795167678689806*^9},
 CellLabel->"Out[16]=",ExpressionUUID->"1c51a19b-22a4-45f2-9bb9-f6d3e3bd2286"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"W", "=", 
   RowBox[{"(", GridBox[{
      {"w11", "w12"},
      {"w12", "w22"}
     }], ")"}]}], ";", 
  RowBox[{"V", "=", 
   RowBox[{"(", GridBox[{
      {"v11", "v12"},
      {"v12", "v22"}
     }], ")"}]}], ";", 
  RowBox[{"T", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"polynomial", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", "T", "]"}], ".", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{"t", "+", "1"}], ")"}], "*", "W"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{"1", "-", "t"}], ")"}], "*", "V"}]}], ")"}], " ", ".", 
    "T"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"dd", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polynomial", ",", "t", ",", "0"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"cc", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polynomial", ",", "t", ",", "1"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"bb", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polynomial", ",", "t", ",", "2"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"aa", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"polynomial", ",", "t", ",", "3"}], "]"}]}]}], "Input",
 CellChangeTimes->{{3.7958012194096527`*^9, 3.795801220833446*^9}, {
  3.795801259690784*^9, 3.7958012629299507`*^9}},
 CellLabel->"In[10]:=",ExpressionUUID->"6418b93b-b1b3-458e-961f-5dd2e66baa2d"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"v11", "+", "w11"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.795801229858797*^9, 3.7958012635037003`*^9},
 CellLabel->"Out[13]=",ExpressionUUID->"2522dc9e-9dc4-4e01-8821-34926a44e864"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", "v11"}], "+", 
    RowBox[{"2", " ", "v12"}], "+", "w11", "+", 
    RowBox[{"2", " ", "w12"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.795801229858797*^9, 3.7958012635048723`*^9},
 CellLabel->"Out[14]=",ExpressionUUID->"aa576678-b94f-4fc5-b2c6-8b15e0aff835"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     RowBox[{"-", "2"}], " ", "v12"}], "+", "v22", "+", 
    RowBox[{"2", " ", "w12"}], "+", "w22"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.795801229858797*^9, 3.795801263506117*^9},
 CellLabel->"Out[15]=",ExpressionUUID->"d6a44561-1ebf-4867-8d2d-bf6794154450"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"-", "v22"}], "+", "w22"}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.795801229858797*^9, 3.795801263507215*^9},
 CellLabel->"Out[16]=",ExpressionUUID->"2ce72db7-9261-44f1-be22-3f7bec3e6f05"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"RowReduce", "[", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "va22"}], "+", "wa22"}], ",", 
       RowBox[{
        RowBox[{"-", "vb22"}], "+", "wa22"}], ",", 
       RowBox[{
        RowBox[{"-", "vc22"}], "+", "wc22"}], ",", 
       RowBox[{
        RowBox[{"-", "vd22"}], "+", "wd22"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "va12"}], "+", "va22", "+", 
        RowBox[{"2", " ", "wa12"}], "+", "wa22"}], ",", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "vb12"}], "+", "vb22", "+", 
        RowBox[{"2", " ", "wb12"}], "+", "wb22"}], ",", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "vc12"}], "+", "vc22", "+", 
        RowBox[{"2", " ", "wc12"}], "+", "wc22"}], ",", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "2"}], " ", "vd12"}], "+", "vd22", "+", 
        RowBox[{"2", " ", "wd12"}], "+", "wd22"}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{
        RowBox[{"-", "va11"}], "+", 
        RowBox[{"2", " ", "va12"}], "+", "wa11", "+", 
        RowBox[{"2", " ", "wa12"}]}], ",", 
       RowBox[{
        RowBox[{"-", "vb11"}], "+", 
        RowBox[{"2", " ", "vb12"}], "+", "wb11", "+", 
        RowBox[{"2", " ", "wb12"}]}], ",", 
       RowBox[{
        RowBox[{"-", "vc11"}], "+", 
        RowBox[{"2", " ", "vc12"}], "+", "wc11", "+", 
        RowBox[{"2", " ", "wc12"}]}], ",", 
       RowBox[{
        RowBox[{"-", "vd11"}], "+", 
        RowBox[{"2", " ", "vd12"}], "+", "wd11", "+", 
        RowBox[{"2", " ", "wd12"}]}]}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"va11", "+", "wa11"}], ",", 
       RowBox[{"vb11", "+", "wb11"}], ",", 
       RowBox[{"vc11", "+", "wc11"}], ",", 
       RowBox[{"vd11", "+", "wd11"}]}], "}"}]}], "}"}], "]"}], "//", 
  "MatrixForm"}]}], "Input",
 CellChangeTimes->{{3.795801451326531*^9, 3.795801519462429*^9}, {
  3.795801563205996*^9, 3.795801570131546*^9}, {3.7958016107910643`*^9, 
  3.7958016148517733`*^9}, {3.795801707396865*^9, 3.7958017802290688`*^9}, {
  3.795801826408331*^9, 3.7958018485385923`*^9}},
 CellLabel->"",ExpressionUUID->"6732450b-27b0-49dd-be26-71e83158532d"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"1", "0", "0", "0"},
     {"0", "1", "0", "0"},
     {"0", "0", "1", "0"},
     {"0", "0", "0", "1"}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.795801459640567*^9, 3.795801467081881*^9}, {
   3.79580151103575*^9, 3.795801523372211*^9}, 3.795801570762089*^9, 
   3.795801781745214*^9, {3.79580182709871*^9, 3.795801831260776*^9}},
 CellLabel->
  "Out[31]//MatrixForm=",ExpressionUUID->"2a213bf0-eb9d-4379-8b86-\
67605c6dd34f"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"RowReduce", "[", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"a", ",", "b", ",", "c"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"d", ",", "e", ",", "f"}], "}"}]}], "}"}], "]"}], "//", 
  "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.795801801858116*^9, 3.79580181756238*^9}},
 CellLabel->"In[29]:=",ExpressionUUID->"1341ecb5-000d-40b7-a100-3efaab3a6b73"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {"1", "0", 
      FractionBox[
       RowBox[{
        RowBox[{"c", " ", "e"}], "-", 
        RowBox[{"b", " ", "f"}]}], 
       RowBox[{
        RowBox[{
         RowBox[{"-", "b"}], " ", "d"}], "+", 
        RowBox[{"a", " ", "e"}]}]]},
     {"0", "1", 
      FractionBox[
       RowBox[{
        RowBox[{"c", " ", "d"}], "-", 
        RowBox[{"a", " ", "f"}]}], 
       RowBox[{
        RowBox[{"b", " ", "d"}], "-", 
        RowBox[{"a", " ", "e"}]}]]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.795801802686091*^9, 3.795801817834387*^9}},
 CellLabel->
  "Out[29]//MatrixForm=",ExpressionUUID->"84007be4-b03d-4ce5-923e-\
e30cbe4019e4"]
}, Open  ]],

Cell[BoxData[
 RowBox[{"RowReduce", "[", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"1", ",", "2", ",", "3", ",", "1", ",", "0", ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{"4", ",", "5", ",", "6", ",", "0", ",", "1", ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{"7", ",", "8", ",", "9", ",", "0", ",", "0", ",", "1"}], "}"}]}],
    "}"}], "]"}]], "Input",
 CellChangeTimes->{{3.795801597410653*^9, 
  3.7958015974333143`*^9}},ExpressionUUID->"e76284fa-10bf-4267-8968-\
fbe9583d1272"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"c", "=", 
   RowBox[{"(", GridBox[{
      {"c11", "c12", "c13"},
      {"c12", "c22", "c23"},
      {"c13", "c23", "c33"}
     }], ")"}]}], ";", 
  RowBox[{"b", "=", 
   RowBox[{"(", GridBox[{
      {"b0"},
      {"b1"},
      {"b2"},
      {"b3"},
      {"b4"},
      {"b5"}
     }], ")"}]}], ";", 
  RowBox[{"T2", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"},
      {
       SuperscriptBox["t", "2"]}
     }], ")"}]}], ";", 
  RowBox[{"T5", "=", 
   RowBox[{"(", GridBox[{
      {
       SuperscriptBox["t", "5"]},
      {
       SuperscriptBox["t", "4"]},
      {
       SuperscriptBox["t", "3"]},
      {
       SuperscriptBox["t", "2"]},
      {"t"},
      {"1"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"tmp", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"Transpose", "[", "T2", "]"}], ".", 
     RowBox[{"(", 
      RowBox[{"t", "*", "c"}], ")"}], ".", "T2"}], "-", 
    RowBox[{
     RowBox[{"Transpose", "[", "b", "]"}], ".", "T5"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c5", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "5"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c4", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "4"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c3", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "3"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c2", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "2"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c1", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "1"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"c0", "=", 
    RowBox[{"Coefficient", "[", 
     RowBox[{"tmp", ",", "t", ",", "0"}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"sz", "=", 
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"c5", "\[Equal]", "0"}], "&&", 
      RowBox[{"c4", "\[Equal]", "0"}], "&&", 
      RowBox[{"c3", "\[Equal]", "0"}], "&&", 
      RowBox[{"c2", "\[Equal]", "0"}], "&&", 
      RowBox[{"c1", "\[Equal]", "0"}], "&&", 
      RowBox[{"c0", "\[Equal]", "0"}]}], ",", 
     RowBox[{"{", 
      RowBox[{
      "b0", ",", "b1", ",", "b2", ",", "b3", ",", " ", "b4", ",", " ", "b5"}],
       "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"b", "/.", "sz"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.795167702781829*^9, 3.795167841936165*^9}, {
  3.795167882548777*^9, 3.795167905134886*^9}, {3.7951679629101763`*^9, 
  3.7951680539829597`*^9}, {3.795168087604536*^9, 3.7951681828922358`*^9}, {
  3.795168300221518*^9, 3.795168340764326*^9}, {3.7951684025608253`*^9, 
  3.795168409365026*^9}, {3.795168463681147*^9, 3.7951684803372602`*^9}, {
  3.795168733731842*^9, 3.7951687340623827`*^9}, {3.7951690412849703`*^9, 
  3.795169041393025*^9}, {3.79516935997691*^9, 3.795169360468025*^9}, {
  3.795170300445424*^9, 3.79517030137973*^9}},
 CellLabel->
  "In[206]:=",ExpressionUUID->"11cf21e9-80af-4174-a80f-d932abd83ecd"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", "c33", "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"2", " ", "c23"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"2", " ", "c13"}], "+", "c22"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"2", " ", "c12"}], "}"}], ",", 
    RowBox[{"{", "c11", "}"}], ",", 
    RowBox[{"{", "0", "}"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{{3.795167751105695*^9, 3.795167758489102*^9}, 
   3.795167803931714*^9, 3.795167842176227*^9, 3.795167896207501*^9, {
   3.79516797246551*^9, 3.795167982129023*^9}, 3.795168021072467*^9, {
   3.795168124258317*^9, 3.795168149894541*^9}, 3.795168184142679*^9, {
   3.795168331542192*^9, 3.795168341645281*^9}, {3.795168405300576*^9, 
   3.795168410431672*^9}, {3.795168471953539*^9, 3.7951684806264277`*^9}, {
   3.795169038528447*^9, 3.795169041787611*^9}, 3.7951703026418133`*^9},
 CellLabel->
  "Out[215]=",ExpressionUUID->"e9debf3f-6ec1-48b1-acc5-7717b8169a3d"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"A", "=", 
   RowBox[{"(", GridBox[{
      {"a", "b"},
      {"b", "c"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"SolveAlways", "[", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"(", GridBox[{
        {"r11", "r12"},
        {"r21", "r22"},
        {"r31", "r32"},
        {"r41", "r42"}
       }], ")"}], ".", 
     RowBox[{"(", GridBox[{
        {"a", "b"},
        {"b", "c"}
       }], ")"}], ".", 
     RowBox[{"(", GridBox[{
        {"s11"},
        {"s12"}
       }], ")"}]}], "==", 
    RowBox[{"(", GridBox[{
       {"c"},
       {
        RowBox[{"2", "*", "b"}]},
       {"a"},
       {"0"}
      }], ")"}]}], ",", 
   RowBox[{"{", 
    RowBox[{"a", ",", "b", ",", "c"}], "}"}]}], "]"}]}], "Input",
 CellChangeTimes->{{3.7951734603724422`*^9, 3.795173655746565*^9}, {
  3.795173921865943*^9, 3.795173964388199*^9}},
 CellLabel->
  "In[234]:=",ExpressionUUID->"a7e57d84-4ae5-4abf-9110-8e9f50e61706"],

Cell[BoxData[
 RowBox[{"{", "}"}]], "Output",
 CellChangeTimes->{
  3.7951736043052053`*^9, {3.795173650573495*^9, 3.795173656731247*^9}, {
   3.795173926667346*^9, 3.7951739681077633`*^9}},
 CellLabel->
  "Out[236]=",ExpressionUUID->"606bea9d-4b61-47b0-8541-96e8e20e1e86"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"d", "=", 
   RowBox[{"(", GridBox[{
      {"d11", "d12", "d13"},
      {"d12", "d22", "d23"},
      {"d13", "d23", "d33"}
     }], ")"}]}], ";", 
  RowBox[{"b", "=", 
   RowBox[{"(", GridBox[{
      {"b0"},
      {"b1"},
      {"b2"},
      {"b3"},
      {"b4"},
      {"b5"}
     }], ")"}]}], ";", 
  RowBox[{"T2", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"},
      {
       SuperscriptBox["t", "2"]}
     }], ")"}]}], ";", 
  RowBox[{"T5", "=", 
   RowBox[{"(", GridBox[{
      {
       SuperscriptBox["t", "5"]},
      {
       SuperscriptBox["t", "4"]},
      {
       SuperscriptBox["t", "3"]},
      {
       SuperscriptBox["t", "2"]},
      {"t"},
      {"1"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"tmp", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"Transpose", "[", "T2", "]"}], ".", 
     RowBox[{"(", "d", ")"}], ".", "T2"}], "-", 
    RowBox[{
     RowBox[{"Transpose", "[", "b", "]"}], ".", "T5"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c5", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "5"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c4", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "4"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c3", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "3"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c2", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "2"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c1", "=", 
   RowBox[{"Coefficient", "[", 
    RowBox[{"tmp", ",", "t", ",", "1"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"c0", "=", 
    RowBox[{"Coefficient", "[", 
     RowBox[{"tmp", ",", "t", ",", "0"}], "]"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"sz", "=", 
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"c5", "\[Equal]", "0"}], "&&", 
      RowBox[{"c4", "\[Equal]", "0"}], "&&", 
      RowBox[{"c3", "\[Equal]", "0"}], "&&", 
      RowBox[{"c2", "\[Equal]", "0"}], "&&", 
      RowBox[{"c1", "\[Equal]", "0"}], "&&", 
      RowBox[{"c0", "\[Equal]", "0"}]}], ",", 
     RowBox[{"{", 
      RowBox[{
      "b0", ",", "b1", ",", "b2", ",", "b3", ",", " ", "b4", ",", " ", "b5"}],
       "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"b", "/.", "sz"}]}], "Input",
 CellChangeTimes->{{3.795168918896687*^9, 3.795168981405614*^9}, {
  3.795169067620393*^9, 3.795169067759836*^9}, {3.795170257774888*^9, 
  3.7951702903716*^9}},
 CellLabel->
  "In[196]:=",ExpressionUUID->"742f9632-b745-4faa-974f-f2a459d4824b"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", "0", "}"}], ",", 
    RowBox[{"{", "d33", "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"2", " ", "d23"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"2", " ", "d13"}], "+", "d22"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"2", " ", "d12"}], "}"}], ",", 
    RowBox[{"{", "d11", "}"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{{3.795168968915567*^9, 3.7951689829944057`*^9}, {
  3.795169043374386*^9, 3.795169068501196*^9}, {3.795170286639452*^9, 
  3.7951702935373287`*^9}},
 CellLabel->
  "Out[205]=",ExpressionUUID->"c60c0d60-c349-4567-9c65-daa8138acf96"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w0", "=", 
   RowBox[{
    RowBox[{"-", "a"}], "*", 
    RowBox[{"(", 
     RowBox[{"t", "-", "1"}], ")"}], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t", "-", "t0"}], ")"}], "2"]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w3", "=", 
   RowBox[{"a", "*", 
    RowBox[{"(", 
     RowBox[{"t", "+", "1"}], ")"}], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t", "+", "t0"}], ")"}], "2"]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w2", "=", 
   RowBox[{
    RowBox[{"-", "b"}], "*", 
    RowBox[{"(", 
     RowBox[{"t", "-", "1"}], ")"}], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t", "-", "t1"}], ")"}], "2"]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w1", "=", 
   RowBox[{"b", "*", 
    RowBox[{"(", 
     RowBox[{"t", "+", "1"}], ")"}], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t", "+", "t1"}], ")"}], "2"]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"poly", "=", 
  RowBox[{
   RowBox[{"w0", "+", "w1", "+", "w2", "+", "w3"}], "//", 
   "Expand"}]}], "\[IndentingNewLine]", 
 RowBox[{"c3", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "3"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c2", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "2"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c1", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "1"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c0", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "0"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"s", "=", 
  RowBox[{"Solve", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"c3", "\[Equal]", "0"}], "&&", 
     RowBox[{"c2", "\[Equal]", "0"}], "&&", 
     RowBox[{"c1", "\[Equal]", "0"}], "&&", 
     RowBox[{"c0", "\[Equal]", "1"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"a", ",", "b"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"a", "=", 
   RowBox[{"s", "[", 
    RowBox[{"[", 
     RowBox[{"All", ",", "1", ",", "2"}], "]"}], "]"}]}], ";", 
  RowBox[{"a", "=", 
   RowBox[{"a", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\n", 
 RowBox[{
  RowBox[{"b", "=", 
   RowBox[{"s", "[", 
    RowBox[{"[", 
     RowBox[{"All", ",", "2", ",", "2"}], "]"}], "]"}]}], ";", 
  RowBox[{"b", "=", 
   RowBox[{"b", "[", 
    RowBox[{"[", "1", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"coeffW0", "=", 
   RowBox[{"CoefficientList", "[", 
    RowBox[{"w0", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"coeffW1", "=", 
   RowBox[{"CoefficientList", "[", 
    RowBox[{"w1", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"coeffW2", "=", 
   RowBox[{"CoefficientList", "[", 
    RowBox[{"w2", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"coeffW3", "=", 
   RowBox[{"CoefficientList", "[", 
    RowBox[{"w3", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"matrixA", "=", 
   RowBox[{"ArrayFlatten", "[", 
    RowBox[{"{", 
     RowBox[{"coeffW0", ",", "coeffW1", ",", "coeffW2", ",", "coeffW3"}], 
     "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"detA", "=", 
  RowBox[{
   RowBox[{"Det", "[", "matrixA", "]"}], "//", 
   "Simplify"}]}], "\[IndentingNewLine]", 
 RowBox[{"NMaximize", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"detA", ",", 
     RowBox[{"t0", "\[GreaterEqual]", " ", 
      FractionBox[
       RowBox[{"-", "1"}], "2"]}], ",", 
     RowBox[{"t1", "\[LessEqual]", "  ", 
      FractionBox[
       RowBox[{"-", "1"}], "2"]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"t0", ",", "t1"}], "}"}]}], 
  "]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.7933906704651985`*^9, 3.793390789374363*^9}, 
   3.7933908315285764`*^9, {3.7933909813905854`*^9, 3.7933910865550766`*^9}, {
   3.7933911445811243`*^9, 3.7933911465670834`*^9}, {3.793391390685851*^9, 
   3.793391471925599*^9}, {3.7933915151350255`*^9, 3.7933915203943896`*^9}, {
   3.7933915591258926`*^9, 3.793391710763659*^9}, {3.7933917594179373`*^9, 
   3.793391925381257*^9}, {3.793391992236201*^9, 3.793391997998762*^9}, {
   3.7933925479189568`*^9, 3.7933926591105127`*^9}, {3.793392816005969*^9, 
   3.793392837208213*^9}, {3.793392901989915*^9, 3.7933929021085725`*^9}, {
   3.7940508873186626`*^9, 3.7940509049276032`*^9}, {3.7940510338640013`*^9, 
   3.794051034855325*^9}, 3.794051292259246*^9, 3.794051790873535*^9},
 CellLabel->
  "In[155]:=",ExpressionUUID->"aa4bffc6-b24c-4dcb-b8d3-b3f6358e3628"],

Cell[BoxData[
 RowBox[{
  RowBox[{"2", " ", "a", " ", 
   SuperscriptBox["t", "2"]}], "+", 
  RowBox[{"2", " ", "b", " ", 
   SuperscriptBox["t", "2"]}], "+", 
  RowBox[{"4", " ", "a", " ", 
   SuperscriptBox["t", "2"], " ", "t0"}], "+", 
  RowBox[{"2", " ", "a", " ", 
   SuperscriptBox["t0", "2"]}], "+", 
  RowBox[{"4", " ", "b", " ", 
   SuperscriptBox["t", "2"], " ", "t1"}], "+", 
  RowBox[{"2", " ", "b", " ", 
   SuperscriptBox["t1", "2"]}]}]], "Output",
 CellChangeTimes->{{3.793391705179598*^9, 3.793391711274295*^9}, {
   3.7933917758908644`*^9, 3.7933917989234734`*^9}, 3.7933919259407597`*^9, 
   3.7933925233505697`*^9, 3.7933925590731664`*^9, {3.7933926066059904`*^9, 
   3.7933926599642467`*^9}, {3.7933928165654435`*^9, 3.793392837613163*^9}, 
   3.7940508298989024`*^9, 3.7940509054163218`*^9, 3.794051035481653*^9, 
   3.794051292754923*^9, 3.794051791300394*^9},
 CellLabel->
  "Out[160]=",ExpressionUUID->"35c3b2ae-4396-498c-95b3-6147e2fa977b"],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{{3.793391705179598*^9, 3.793391711274295*^9}, {
   3.7933917758908644`*^9, 3.7933917989234734`*^9}, 3.7933919259407597`*^9, 
   3.7933925233505697`*^9, 3.7933925590731664`*^9, {3.7933926066059904`*^9, 
   3.7933926599642467`*^9}, {3.7933928165654435`*^9, 3.793392837613163*^9}, 
   3.7940508298989024`*^9, 3.7940509054163218`*^9, 3.794051035481653*^9, 
   3.794051292754923*^9, 3.7940517913083706`*^9},
 CellLabel->
  "Out[161]=",ExpressionUUID->"a4f1a2b7-8612-4212-b2d1-ddd10c6e6b69"],

Cell[BoxData[
 RowBox[{
  RowBox[{"2", " ", "a"}], "+", 
  RowBox[{"2", " ", "b"}], "+", 
  RowBox[{"4", " ", "a", " ", "t0"}], "+", 
  RowBox[{"4", " ", "b", " ", "t1"}]}]], "Output",
 CellChangeTimes->{{3.793391705179598*^9, 3.793391711274295*^9}, {
   3.7933917758908644`*^9, 3.7933917989234734`*^9}, 3.7933919259407597`*^9, 
   3.7933925233505697`*^9, 3.7933925590731664`*^9, {3.7933926066059904`*^9, 
   3.7933926599642467`*^9}, {3.7933928165654435`*^9, 3.793392837613163*^9}, 
   3.7940508298989024`*^9, 3.7940509054163218`*^9, 3.794051035481653*^9, 
   3.794051292754923*^9, 3.79405179131236*^9},
 CellLabel->
  "Out[162]=",ExpressionUUID->"392d0b53-9003-4dce-890f-297c707927e9"],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{{3.793391705179598*^9, 3.793391711274295*^9}, {
   3.7933917758908644`*^9, 3.7933917989234734`*^9}, 3.7933919259407597`*^9, 
   3.7933925233505697`*^9, 3.7933925590731664`*^9, {3.7933926066059904`*^9, 
   3.7933926599642467`*^9}, {3.7933928165654435`*^9, 3.793392837613163*^9}, 
   3.7940508298989024`*^9, 3.7940509054163218`*^9, 3.794051035481653*^9, 
   3.794051292754923*^9, 3.7940517913163805`*^9},
 CellLabel->
  "Out[163]=",ExpressionUUID->"f882a138-3320-4099-9d29-20a3a35264b5"],

Cell[BoxData[
 RowBox[{
  RowBox[{"2", " ", "a", " ", 
   SuperscriptBox["t0", "2"]}], "+", 
  RowBox[{"2", " ", "b", " ", 
   SuperscriptBox["t1", "2"]}]}]], "Output",
 CellChangeTimes->{{3.793391705179598*^9, 3.793391711274295*^9}, {
   3.7933917758908644`*^9, 3.7933917989234734`*^9}, 3.7933919259407597`*^9, 
   3.7933925233505697`*^9, 3.7933925590731664`*^9, {3.7933926066059904`*^9, 
   3.7933926599642467`*^9}, {3.7933928165654435`*^9, 3.793392837613163*^9}, 
   3.7940508298989024`*^9, 3.7940509054163218`*^9, 3.794051035481653*^9, 
   3.794051292754923*^9, 3.7940517913204374`*^9},
 CellLabel->
  "Out[164]=",ExpressionUUID->"166137b2-7d86-4885-8da9-d13219152e72"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"a", "\[Rule]", 
     RowBox[{"-", 
      FractionBox[
       RowBox[{"1", "+", 
        RowBox[{"2", " ", "t1"}]}], 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", 
           SuperscriptBox["t0", "2"]}], "-", 
          RowBox[{"2", " ", 
           SuperscriptBox["t0", "2"], " ", "t1"}], "+", 
          SuperscriptBox["t1", "2"], "+", 
          RowBox[{"2", " ", "t0", " ", 
           SuperscriptBox["t1", "2"]}]}], ")"}]}]]}]}], ",", 
    RowBox[{"b", "\[Rule]", 
     RowBox[{"-", 
      FractionBox[
       RowBox[{
        RowBox[{"-", "1"}], "-", 
        RowBox[{"2", " ", "t0"}]}], 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", 
           SuperscriptBox["t0", "2"]}], "-", 
          RowBox[{"2", " ", 
           SuperscriptBox["t0", "2"], " ", "t1"}], "+", 
          SuperscriptBox["t1", "2"], "+", 
          RowBox[{"2", " ", "t0", " ", 
           SuperscriptBox["t1", "2"]}]}], ")"}]}]]}]}]}], "}"}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.793391705179598*^9, 3.793391711274295*^9}, {
   3.7933917758908644`*^9, 3.7933917989234734`*^9}, 3.7933919259407597`*^9, 
   3.7933925233505697`*^9, 3.7933925590731664`*^9, {3.7933926066059904`*^9, 
   3.7933926599642467`*^9}, {3.7933928165654435`*^9, 3.793392837613163*^9}, 
   3.7940508298989024`*^9, 3.7940509054163218`*^9, 3.794051035481653*^9, 
   3.794051292754923*^9, 3.794051791326392*^9},
 CellLabel->
  "Out[165]=",ExpressionUUID->"cb6266e8-6420-46ac-a620-d726a596cca5"],

Cell[BoxData[
 RowBox[{"-", 
  FractionBox[
   RowBox[{
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"2", " ", "t0"}]}], ")"}], "2"], " ", 
    RowBox[{"(", 
     RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"1", "+", 
       RowBox[{"2", " ", "t1"}]}], ")"}], "2"]}], 
   RowBox[{"4", " ", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t0", "-", "t1"}], ")"}], "2"], " ", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t0", "+", "t1", "+", 
       RowBox[{"2", " ", "t0", " ", "t1"}]}], ")"}], "3"]}]]}]], "Output",
 CellChangeTimes->{{3.793391705179598*^9, 3.793391711274295*^9}, {
   3.7933917758908644`*^9, 3.7933917989234734`*^9}, 3.7933919259407597`*^9, 
   3.7933925233505697`*^9, 3.7933925590731664`*^9, {3.7933926066059904`*^9, 
   3.7933926599642467`*^9}, {3.7933928165654435`*^9, 3.793392837613163*^9}, 
   3.7940508298989024`*^9, 3.7940509054163218`*^9, 3.794051035481653*^9, 
   3.794051292754923*^9, 3.7940517913323746`*^9},
 CellLabel->
  "Out[173]=",ExpressionUUID->"0afb9c9f-f7a3-40a9-a53f-aa850e24d8e3"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"0.3318828867545144`", ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"t0", "\[Rule]", "0.03088254431753318`"}], ",", 
     RowBox[{"t1", "\[Rule]", 
      RowBox[{"-", "0.773548588530471`"}]}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.793391705179598*^9, 3.793391711274295*^9}, {
   3.7933917758908644`*^9, 3.7933917989234734`*^9}, 3.7933919259407597`*^9, 
   3.7933925233505697`*^9, 3.7933925590731664`*^9, {3.7933926066059904`*^9, 
   3.7933926599642467`*^9}, {3.7933928165654435`*^9, 3.793392837613163*^9}, 
   3.7940508298989024`*^9, 3.7940509054163218`*^9, 3.794051035481653*^9, 
   3.794051292754923*^9, 3.7940517914035006`*^9},
 CellLabel->
  "Out[174]=",ExpressionUUID->"4d40775f-eb7e-447e-933b-44efede4395d"]
}, Open  ]],

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{"Clear", "[", 
  RowBox[{"a", ",", "b", ",", "c", ",", "d"}], "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w0", "=", 
   RowBox[{
    RowBox[{"-", "a"}], "*", 
    RowBox[{"(", 
     RowBox[{"t", "-", "1"}], ")"}], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t", "-", "t0"}], ")"}], "2"], "  ", "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t", "-", "t2"}], ")"}], "2"]}]}], " ", 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w3", "=", 
   RowBox[{
    RowBox[{"-", "a"}], "*", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "t"}], "-", "1"}], ")"}], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "t"}], "-", "t0"}], ")"}], "2"], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "t"}], "-", "t2"}], ")"}], "2"]}]}], " ", 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w2", "=", 
   RowBox[{
    RowBox[{"-", "b"}], "*", 
    RowBox[{"(", 
     RowBox[{"t", "-", "1"}], ")"}], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t", "-", "t1"}], ")"}], "2"], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{"t", "-", "t3"}], ")"}], "2"]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"w1", "=", 
   RowBox[{
    RowBox[{"-", "b"}], "*", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "t"}], "-", "1"}], ")"}], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "t"}], "-", "t1"}], ")"}], "2"], "*", 
    SuperscriptBox[
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "t"}], "-", "t3"}], ")"}], "2"]}]}], " ", 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"poly", "=", 
   RowBox[{"w0", "+", "w1", "+", "w2", "+", "w3"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"c5", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "5"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c4", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "4"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c3", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "3"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c2", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "2"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c1", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "1"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"c0", "=", 
  RowBox[{"Coefficient", "[", 
   RowBox[{"poly", ",", "t", ",", "0"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{"s", "=", 
  RowBox[{
   RowBox[{"Solve", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"c5", "\[Equal]", "0"}], "&&", 
      RowBox[{"c4", "\[Equal]", "0"}], " ", "&&", " ", 
      RowBox[{"c3", "\[Equal]", "0"}], "&&", 
      RowBox[{"c2", "\[Equal]", "0"}], "&&", 
      RowBox[{"c1", "\[Equal]", "0"}], "&&", 
      RowBox[{"c0", "\[Equal]", "1"}]}], ",", 
     RowBox[{"{", 
      RowBox[{"a", ",", "b", ",", "c", ",", "d"}], "}"}]}], "]"}], "//", 
   "Simplify"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"a", "=", 
   RowBox[{"s", "[", 
    RowBox[{"[", 
     RowBox[{"All", ",", "1", ",", "2"}], "]"}], "]"}]}], ";", 
  RowBox[{"a", "=", 
   RowBox[{"a", "[", 
    RowBox[{"[", "2", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"b", "=", 
   RowBox[{"s", "[", 
    RowBox[{"[", 
     RowBox[{"All", ",", "2", ",", "2"}], "]"}], "]"}]}], ";", 
  RowBox[{"b", "=", 
   RowBox[{"b", "[", 
    RowBox[{"[", "2", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"c", "=", 
   RowBox[{"s", "[", 
    RowBox[{"[", 
     RowBox[{"All", ",", "3", ",", "2"}], "]"}], "]"}]}], ";", 
  RowBox[{"c", "=", 
   RowBox[{"c", "[", 
    RowBox[{"[", "2", "]"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"coeffW0", "=", 
   RowBox[{"CoefficientList", "[", 
    RowBox[{"w0", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"coeffW1", "=", 
   RowBox[{"CoefficientList", "[", 
    RowBox[{"w1", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"coeffW2", "=", 
   RowBox[{"CoefficientList", "[", 
    RowBox[{"w2", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"coeffW3", "=", 
   RowBox[{"CoefficientList", "[", 
    RowBox[{"w3", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"matrixA", "=", 
   RowBox[{"ArrayFlatten", "[", 
    RowBox[{"{", 
     RowBox[{"coeffW0", ",", "coeffW1", ",", "coeffW2", ",", "coeffW3"}], 
     "}"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"matrixA", "=", 
   RowBox[{"Transpose", "[", "matrixA", "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"matrixB", "=", 
   RowBox[{"Take", "[", 
    RowBox[{"matrixA", ",", 
     RowBox[{"{", 
      RowBox[{"2", ",", "5"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{"1", ",", "4"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"detA", "=", 
  RowBox[{
   RowBox[{"Det", "[", "matrixB", "]"}], "//", 
   "Simplify"}]}], "\[IndentingNewLine]", "s", "\[IndentingNewLine]"}], \
"Input",
 CellChangeTimes->{{3.793393904942597*^9, 3.793393993667604*^9}, {
   3.7933940664579725`*^9, 3.7933941245894365`*^9}, {3.7933945007671747`*^9, 
   3.7933945288710337`*^9}, {3.793394616205364*^9, 3.7933947363910456`*^9}, {
   3.793394894046912*^9, 3.79339489822274*^9}, {3.7933953789065266`*^9, 
   3.793395454066513*^9}, {3.79339616469441*^9, 3.7933962124818106`*^9}, {
   3.793396315397455*^9, 3.7933963549476395`*^9}, {3.7933964410887623`*^9, 
   3.793396527224369*^9}, {3.793396629439858*^9, 3.793396629515681*^9}, {
   3.7933966743736653`*^9, 3.793396674461429*^9}, {3.7933967086659145`*^9, 
   3.7933967385319767`*^9}, 3.7933967904896154`*^9, {3.793396823883269*^9, 
   3.793396960028776*^9}, {3.7933970300104485`*^9, 3.793397064727566*^9}, {
   3.7933972131791506`*^9, 3.7933972644806776`*^9}, {3.7933974656129456`*^9, 
   3.7933974855037713`*^9}, {3.7933975997016687`*^9, 
   3.7933977037340107`*^9}, {3.793399936167626*^9, 3.7933999478653283`*^9}, {
   3.7933999910298367`*^9, 3.7934000339619665`*^9}, {3.793400142918451*^9, 
   3.793400210295181*^9}, 3.793440678079035*^9, {3.7934407094860783`*^9, 
   3.7934407297254705`*^9}, {3.793440787381298*^9, 3.7934407911641836`*^9}, {
   3.7940507840992723`*^9, 3.794050808458946*^9}},
 CellLabel->"In[1]:=",ExpressionUUID->"6ca861b0-9c25-4e76-b363-ead5b0dbda31"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(*", 
   RowBox[{
   "Compute", " ", "the", " ", "gradient", " ", "needed", " ", "for", " ", 
    "NLOPT", " ", "when", " ", "using", " ", "the", " ", "MINVO", " ", 
    "basis"}], "*)"}], "\[IndentingNewLine]", 
  RowBox[{
   RowBox[{
    RowBox[{"M", "=", 
     RowBox[{"(", GridBox[{
        {"m11", "m21", "m31", "m41"},
        {"m12", "m22", "m32", "m42"},
        {"m13", "m23", "m33", "m43"},
        {"m14", "m24", "m34", "m44"}
       }], ")"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{"(*", 
    RowBox[{"Note", " ", "now", " ", "that", " ", 
     RowBox[{"the", " ", "**", "rows", "**", " ", "are"}], " ", "the", " ", 
     "control", " ", "points"}], "*)"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"Qbs", "=", 
     RowBox[{"(", GridBox[{
        {"qb11", "qb12", "qb13"},
        {"qb21", "qb22", "qb23"},
        {"qb31", "qb32", "qb33"},
        {"qb41", "qb42", "qb43"}
       }], ")"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"n", "=", 
     RowBox[{"(", GridBox[{
        {"n1"},
        {"n2"},
        {"n3"}
       }], ")"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"Qmv", "=", 
     RowBox[{"M", ".", "Qbs"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"qm2", "=", 
     RowBox[{"Qmv", "[", 
      RowBox[{"[", "2", "]"}], "]"}]}], ";", " ", 
    RowBox[{"(*", 
     RowBox[{
     "Extract", " ", "the", " ", "row", " ", "2", " ", "for", " ", 
      "example"}], "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     SubscriptBox["\[PartialD]", "qb11"], 
     RowBox[{"(", 
      RowBox[{"qm2", ".", "n"}], ")"}]}]}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     SubscriptBox["\[PartialD]", "qb12"], 
     RowBox[{"(", 
      RowBox[{"qm2", ".", "n"}], ")"}]}], "`"}], "\[IndentingNewLine]", 
   RowBox[{
    SubscriptBox["\[PartialD]", "qb13"], 
    RowBox[{"(", 
     RowBox[{"qm2", ".", "n"}], ")"}]}], "\[IndentingNewLine]", 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.794939725182231*^9, 3.794939730893549*^9}, {
  3.794939819102404*^9, 3.7949400120158663`*^9}, {3.794940051776359*^9, 
  3.794940234945656*^9}, {3.7949403774591703`*^9, 3.794940424483802*^9}, {
  3.794940457387311*^9, 
  3.794940516579865*^9}},ExpressionUUID->"622054ab-dfee-4aa0-b096-\
d515217ff63a"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"m12", " ", "n1"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7949402056620827`*^9, 3.794940427571137*^9, {3.79494047726823*^9, 
   3.794940487442683*^9}},
 CellLabel->"Out[38]=",ExpressionUUID->"aac30e76-c803-46f2-b507-41c4192d989b"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"m12", " ", "n2"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7949402056620827`*^9, 3.794940427571137*^9, {3.79494047726823*^9, 
   3.794940487443656*^9}},
 CellLabel->"Out[39]=",ExpressionUUID->"607835eb-db70-4ca1-8d3d-c0165b56c3db"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"m12", " ", "n3"}], "}"}]], "Output",
 CellChangeTimes->{
  3.7949402056620827`*^9, 3.794940427571137*^9, {3.79494047726823*^9, 
   3.7949404874446583`*^9}},
 CellLabel->"Out[40]=",ExpressionUUID->"227b3054-0654-4b40-9533-68f3f7d00cf2"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"\[IndentingNewLine]", 
  RowBox[{
   RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
   
   RowBox[{
    RowBox[{"f", "=", 
     FractionBox[
      RowBox[{
       RowBox[{"-", "4"}], "*", 
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{"t0", "+", 
          FractionBox["1", "2"]}], ")"}], "2"], "*", 
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{"t1", "+", 
          FractionBox["1", "2"]}], ")"}], "2"], "*", 
       RowBox[{"(", 
        RowBox[{"t0", "+", "t1", "+", "2"}], ")"}]}], 
      RowBox[{
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{"t0", "-", "t1"}], ")"}], "2"], 
       SuperscriptBox[
        RowBox[{"(", 
         RowBox[{
          RowBox[{"2", "*", "t0", "*", "t1"}], "+", "t0", "+", "t1"}], ")"}], 
        "3"]}]]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{
     RowBox[{"Grad", "[", 
      RowBox[{"f", ",", 
       RowBox[{"{", 
        RowBox[{"t0", ",", "t1"}], "}"}]}], "]"}], "//", "Simplify"}], "//", 
    "MatrixForm"}], "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.793718258072879*^9, 3.7937184250244646`*^9}},
 CellLabel->"In[22]:=",ExpressionUUID->"d98f2185-9d1b-4da4-af77-60595f1316cd"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", 
   TagBox[GridBox[{
      {
       FractionBox[
        RowBox[{
         RowBox[{"(", 
          RowBox[{"1", "+", 
           RowBox[{"2", " ", "t0"}]}], ")"}], " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"1", "+", 
            RowBox[{"2", " ", "t1"}]}], ")"}], "2"], " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"-", "t1"}], " ", 
            SuperscriptBox[
             RowBox[{"(", 
              RowBox[{"1", "+", "t1"}], ")"}], "2"]}], "+", 
           RowBox[{
            SuperscriptBox["t0", "3"], " ", 
            RowBox[{"(", 
             RowBox[{"2", "+", 
              RowBox[{"4", " ", "t1"}]}], ")"}]}], "+", 
           RowBox[{"2", " ", 
            SuperscriptBox["t0", "2"], " ", 
            RowBox[{"(", 
             RowBox[{"4", "+", 
              RowBox[{"9", " ", "t1"}], "+", 
              RowBox[{"3", " ", 
               SuperscriptBox["t1", "2"]}]}], ")"}]}], "+", 
           RowBox[{"t0", " ", 
            RowBox[{"(", 
             RowBox[{"5", "+", 
              RowBox[{"10", " ", "t1"}], "+", 
              SuperscriptBox["t1", "2"], "-", 
              RowBox[{"2", " ", 
               SuperscriptBox["t1", "3"]}]}], ")"}]}]}], ")"}]}], 
        RowBox[{"2", " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"t0", "-", "t1"}], ")"}], "3"], " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"t0", "+", "t1", "+", 
            RowBox[{"2", " ", "t0", " ", "t1"}]}], ")"}], "4"]}]]},
      {
       FractionBox[
        RowBox[{
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"1", "+", 
            RowBox[{"2", " ", "t0"}]}], ")"}], "2"], " ", 
         RowBox[{"(", 
          RowBox[{"1", "+", 
           RowBox[{"2", " ", "t1"}]}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            SuperscriptBox["t0", "3"], " ", 
            RowBox[{"(", 
             RowBox[{"1", "+", 
              RowBox[{"2", " ", "t1"}]}], ")"}]}], "-", 
           RowBox[{"t1", " ", 
            RowBox[{"(", 
             RowBox[{"5", "+", 
              RowBox[{"8", " ", "t1"}], "+", 
              RowBox[{"2", " ", 
               SuperscriptBox["t1", "2"]}]}], ")"}]}], "-", 
           RowBox[{
            SuperscriptBox["t0", "2"], " ", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"-", "2"}], "+", "t1", "+", 
              RowBox[{"6", " ", 
               SuperscriptBox["t1", "2"]}]}], ")"}]}], "-", 
           RowBox[{"t0", " ", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"-", "1"}], "+", 
              RowBox[{"10", " ", "t1"}], "+", 
              RowBox[{"18", " ", 
               SuperscriptBox["t1", "2"]}], "+", 
              RowBox[{"4", " ", 
               SuperscriptBox["t1", "3"]}]}], ")"}]}]}], ")"}]}], 
        RowBox[{"2", " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"t0", "-", "t1"}], ")"}], "3"], " ", 
         SuperscriptBox[
          RowBox[{"(", 
           RowBox[{"t0", "+", "t1", "+", 
            RowBox[{"2", " ", "t0", " ", "t1"}]}], ")"}], "4"]}]]}
     },
     GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}}],
    Column], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.793393948130289*^9, 3.7933939941313887`*^9}, 
   3.793394074816581*^9, {3.7933941145801888`*^9, 3.7933941250502005`*^9}, {
   3.7933944969871283`*^9, 3.793394530517625*^9}, 3.7933946204701085`*^9, {
   3.7933946597455564`*^9, 3.793394706073165*^9}, 3.793394737025355*^9, {
   3.7933948880788517`*^9, 3.7933948986086874`*^9}, {3.793396204943983*^9, 
   3.7933962130133877`*^9}, 3.7933962598959255`*^9, {3.7933963201706567`*^9, 
   3.793396329272336*^9}, {3.793396441443812*^9, 3.7933965350783267`*^9}, 
   3.793396629932539*^9, 3.7933966749032264`*^9, {3.7933967091476293`*^9, 
   3.7933967452300606`*^9}, {3.793396824209421*^9, 3.793396846014072*^9}, {
   3.7933968793389087`*^9, 3.7933969333369837`*^9}, 3.7933969762653065`*^9, {
   3.7933970537170105`*^9, 3.7933970658495626`*^9}, {3.793397218017233*^9, 
   3.79339726498133*^9}, {3.7933974666452312`*^9, 3.7933974863066225`*^9}, {
   3.79339761940495*^9, 3.793397726172974*^9}, {3.7933999225420513`*^9, 
   3.7933999489354343`*^9}, {3.793400007865788*^9, 3.793400034477564*^9}, {
   3.79340017608668*^9, 3.79340021053551*^9}, 3.793440682495229*^9, {
   3.7934407200205665`*^9, 3.7934407302510653`*^9}, 3.7934407938366737`*^9, {
   3.7937183779562263`*^9, 3.7937184255779877`*^9}},
 CellLabel->
  "Out[24]//MatrixForm=",ExpressionUUID->"4031a69e-9dff-4cf5-bb01-\
c2f02b635511"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"det", "=", 
   RowBox[{"Det", "[", 
    RowBox[{"(", GridBox[{
       {"v11", "v21", "v31", "v41"},
       {"v12", "v22", "v32", "v42"},
       {"v13", "v23", "v33", "v43"},
       {"1", "1", "1", "1"}
      }], ")"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  SubscriptBox["\[PartialD]", "v11"], "det"}], "\[IndentingNewLine]", 
 RowBox[{
  SubscriptBox["\[PartialD]", "v12"], "det"}], "\[IndentingNewLine]", 
 RowBox[{
  SubscriptBox["\[PartialD]", "v13"], "det"}]}], "Input",
 CellChangeTimes->{{3.793732243661338*^9, 3.793732340405139*^9}, {
  3.7937329172267275`*^9, 3.7937329254489822`*^9}},
 CellLabel->"In[32]:=",ExpressionUUID->"47963974-728f-4397-bcc9-608e5d337f46"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"-", "v23"}], " ", "v32"}], "+", 
  RowBox[{"v22", " ", "v33"}], "+", 
  RowBox[{"v23", " ", "v42"}], "-", 
  RowBox[{"v33", " ", "v42"}], "-", 
  RowBox[{"v22", " ", "v43"}], "+", 
  RowBox[{"v32", " ", "v43"}]}]], "Output",
 CellChangeTimes->{3.7937323107372217`*^9, 3.7937323408118334`*^9},
 CellLabel->"Out[34]=",ExpressionUUID->"c67fd31e-91e9-48ad-b653-4a195163d127"],

Cell[BoxData[
 RowBox[{
  RowBox[{"v23", " ", "v31"}], "-", 
  RowBox[{"v21", " ", "v33"}], "-", 
  RowBox[{"v23", " ", "v41"}], "+", 
  RowBox[{"v33", " ", "v41"}], "+", 
  RowBox[{"v21", " ", "v43"}], "-", 
  RowBox[{"v31", " ", "v43"}]}]], "Output",
 CellChangeTimes->{3.7937323107372217`*^9, 3.7937323408188143`*^9},
 CellLabel->"Out[35]=",ExpressionUUID->"2f661065-22a3-4f25-b9ce-0de40bd44b0f"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"-", "v22"}], " ", "v31"}], "+", 
  RowBox[{"v21", " ", "v32"}], "+", 
  RowBox[{"v22", " ", "v41"}], "-", 
  RowBox[{"v32", " ", "v41"}], "-", 
  RowBox[{"v21", " ", "v42"}], "+", 
  RowBox[{"v31", " ", "v42"}]}]], "Output",
 CellChangeTimes->{3.7937323107372217`*^9, 3.7937323408247986`*^9},
 CellLabel->"Out[36]=",ExpressionUUID->"07528bde-94c3-4bf1-bfb9-ce3497b4d423"]
}, Open  ]],

Cell[BoxData[
 RowBox[{"\[IndentingNewLine]", 
  RowBox[{
   RowBox[{
    RowBox[{"R", "=", 
     RowBox[{"(", GridBox[{
        {"r11", "r12", "r13", "r14"},
        {"r21", "r22", "r23", "r24"},
        {"r31", "r32", "r33", "r34"},
        {"r41", "r42", "r43", "r44"}
       }], ")"}]}], ";", 
    RowBox[{"Q", "=", 
     RowBox[{"(", GridBox[{
        {"1", "0", "0", "0"},
        {"0", "1", "0", "0"},
        {"0", "0", "1", "0"}
       }], ")"}]}], ";", " ", 
    RowBox[{"s", "=", 
     RowBox[{"(", GridBox[{
        {"0"},
        {"0"},
        {"0"},
        {"1"}
       }], ")"}]}], ";", 
    RowBox[{"\[Lambda]", "=", 
     RowBox[{"(", GridBox[{
        {"\[Lambda]1"},
        {"\[Lambda]2"},
        {"\[Lambda]3"},
        {"\[Lambda]4"}
       }], ")"}]}], ";", 
    RowBox[{"\[Alpha]a", "=", 
     RowBox[{"(", GridBox[{
        {"\[Alpha]a1"},
        {"\[Alpha]a2"},
        {"\[Alpha]a3"}
       }], ")"}]}], ";", 
    RowBox[{"\[Alpha]c", "=", 
     RowBox[{"(", GridBox[{
        {"\[Alpha]c1"},
        {"\[Alpha]c2"},
        {"\[Alpha]c3"},
        {"\[Alpha]c4"}
       }], ")"}]}], ";", 
    RowBox[{"\[Beta]", "=", 
     RowBox[{"(", GridBox[{
        {"\[Beta]1"},
        {"\[Beta]2"},
        {"\[Beta]3"},
        {"\[Beta]4"}
       }], ")"}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"deriv", "=", 
     RowBox[{"2", "*", 
      RowBox[{"Det", "[", "R", "]"}], "*", 
      RowBox[{"Det", "[", "R", "]"}], "*", 
      RowBox[{"Inverse", "[", 
       RowBox[{"Transpose", "[", "R", "]"}], "]"}]}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"det2", "=", 
     RowBox[{
      RowBox[{"Det", "[", "R", "]"}], "*", 
      RowBox[{"Det", "[", "R", "]"}]}]}], ";"}], "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"derivr11", "=", 
     RowBox[{
      SubscriptBox["\[PartialD]", "r11"], "det2"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"derivr12", "=", 
     RowBox[{
      SubscriptBox["\[PartialD]", "r12"], "det2"}]}], ";"}], 
   "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"derivr11", "-", 
     RowBox[{"deriv", "[", 
      RowBox[{"[", 
       RowBox[{"1", ",", "1"}], "]"}], "]"}]}], "//", "Simplify"}], 
   "\[IndentingNewLine]", 
   RowBox[{"derivr12", "-", 
    RowBox[{"deriv", "[", 
     RowBox[{"[", 
      RowBox[{"1", ",", "2"}], "]"}], "]"}]}], 
   "\[IndentingNewLine]"}]}]], "Input",
 CellChangeTimes->{{3.7938101052415266`*^9, 3.793810297557245*^9}, {
   3.7938105200806675`*^9, 3.7938105416531453`*^9}, {3.7938105868533287`*^9, 
   3.793810656268327*^9}, {3.793810714080903*^9, 3.7938107386084714`*^9}, {
   3.7939074133359575`*^9, 3.793907489597103*^9}, {3.7939075212876263`*^9, 
   3.793907595274892*^9}, 
   3.795812253256371*^9},ExpressionUUID->"0a187e21-41de-47bd-8e47-\
d9c139efb55d"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"pol", "=", 
   RowBox[{
    RowBox[{"t", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{"s", "[", "t", "]"}], "-", 
       RowBox[{"r", "[", "t", "]"}]}], ")"}]}], "+", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"s", "[", "t", "]"}], "+", 
      RowBox[{"r", "[", "t", "]"}]}], ")"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"d1", "=", 
   RowBox[{"D", "[", 
    RowBox[{"pol", ",", "t"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"d2", "=", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"D", "[", 
      RowBox[{"pol", ",", "t"}], "]"}], ",", "t"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"d3", "=", 
   RowBox[{"D", "[", 
    RowBox[{
     RowBox[{"D", "[", 
      RowBox[{
       RowBox[{"D", "[", 
        RowBox[{"pol", ",", "t"}], "]"}], ",", "t"}], "]"}], ",", "t"}], 
    "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"t", "=", "0"}], ";"}], 
  " "}], "\[IndentingNewLine]", "d1", "\[IndentingNewLine]", "d2", "\
\[IndentingNewLine]", 
 RowBox[{"d3", "\[IndentingNewLine]", 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.7958119960516987`*^9, 3.795812066072579*^9}, {
  3.795812102106208*^9, 3.795812157000587*^9}, {3.795812228333043*^9, 
  3.795812281175359*^9}},
 CellLabel->"In[77]:=",ExpressionUUID->"037079bc-3a13-4793-bbea-8aaa978eac08"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   RowBox[{"r", "[", "0", "]"}]}], "+", 
  RowBox[{"s", "[", "0", "]"}], "+", 
  RowBox[{
   SuperscriptBox["r", "\[Prime]",
    MultilineFunction->None], "[", "0", "]"}], "+", 
  RowBox[{
   SuperscriptBox["s", "\[Prime]",
    MultilineFunction->None], "[", "0", "]"}]}]], "Output",
 CellChangeTimes->{{3.795812274873337*^9, 3.795812281456791*^9}},
 CellLabel->"Out[83]=",ExpressionUUID->"f332d60e-fefe-4910-b3c0-2a05edefc59b"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"-", "2"}], " ", 
   RowBox[{
    SuperscriptBox["r", "\[Prime]",
     MultilineFunction->None], "[", "0", "]"}]}], "+", 
  RowBox[{"2", " ", 
   RowBox[{
    SuperscriptBox["s", "\[Prime]",
     MultilineFunction->None], "[", "0", "]"}]}], "+", 
  RowBox[{
   SuperscriptBox["r", "\[Prime]\[Prime]",
    MultilineFunction->None], "[", "0", "]"}], "+", 
  RowBox[{
   SuperscriptBox["s", "\[Prime]\[Prime]",
    MultilineFunction->None], "[", "0", "]"}]}]], "Output",
 CellChangeTimes->{{3.795812274873337*^9, 3.795812281458282*^9}},
 CellLabel->"Out[84]=",ExpressionUUID->"49281056-b840-4e84-b2c1-c5732e67f997"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"-", "3"}], " ", 
   RowBox[{
    SuperscriptBox["r", "\[Prime]\[Prime]",
     MultilineFunction->None], "[", "0", "]"}]}], "+", 
  RowBox[{"3", " ", 
   RowBox[{
    SuperscriptBox["s", "\[Prime]\[Prime]",
     MultilineFunction->None], "[", "0", "]"}]}], "+", 
  RowBox[{
   SuperscriptBox["r", 
    TagBox[
     RowBox[{"(", "3", ")"}],
     Derivative],
    MultilineFunction->None], "[", "0", "]"}], "+", 
  RowBox[{
   SuperscriptBox["s", 
    TagBox[
     RowBox[{"(", "3", ")"}],
     Derivative],
    MultilineFunction->None], "[", "0", "]"}]}]], "Output",
 CellChangeTimes->{{3.795812274873337*^9, 3.795812281459386*^9}},
 CellLabel->"Out[85]=",ExpressionUUID->"35391721-e21c-4eaa-829a-59e60128a713"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"novale", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", 
     RowBox[{"(", GridBox[{
        {"1"},
        {"t"}
       }], ")"}], "]"}], ".", 
    RowBox[{"(", GridBox[{
       {"a", "b"},
       {"b", "c"}
      }], ")"}], ".", 
    RowBox[{"(", GridBox[{
       {"1"},
       {"t"}
      }], ")"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{"novale", ",", "t"}], "]"}], "//", "Expand"}]}], "Input",
 CellChangeTimes->{{3.795812394778564*^9, 3.795812442266679*^9}, {
  3.7958124949718437`*^9, 3.795812499180483*^9}},
 CellLabel->"In[98]:=",ExpressionUUID->"a3861b13-ed09-44f7-93cc-f8c2e52e5aa3"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"2", " ", "b"}], "+", 
    RowBox[{"2", " ", "c", " ", "t"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{{3.7958124322660923`*^9, 3.7958124426395273`*^9}, {
  3.795812497241843*^9, 3.795812499743782*^9}},
 CellLabel->
  "Out[100]=",ExpressionUUID->"07976123-9fb5-4024-8c63-02032e7df918"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"2", "*", 
  RowBox[{
   RowBox[{"Transpose", "[", 
    RowBox[{"(", GridBox[{
       {"0"},
       {"1"}
      }], ")"}], "]"}], ".", 
   RowBox[{"(", GridBox[{
      {"a", "b"},
      {"b", "c"}
     }], ")"}], ".", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"}
     }], ")"}]}]}]], "Input",
 CellChangeTimes->{{3.79581258546507*^9, 3.795812606680969*^9}, {
  3.795812662797934*^9, 3.7958126656413937`*^9}},
 CellLabel->
  "In[102]:=",ExpressionUUID->"1a16df58-72bf-4488-9954-1f73222581e1"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{"b", "+", 
      RowBox[{"c", " ", "t"}]}], ")"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.795812607206942*^9, 3.795812666333514*^9},
 CellLabel->
  "Out[102]=",ExpressionUUID->"3b0bdc9c-9eff-4584-a88f-38c9fb6b8c12"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"2", "*", 
  RowBox[{
   RowBox[{"Transpose", "[", 
    RowBox[{"(", GridBox[{
       {"1"},
       {"t"}
      }], ")"}], "]"}], ".", 
   RowBox[{"Transpose", "[", 
    RowBox[{"(", GridBox[{
       {"0", "0"},
       {"1", "0"}
      }], ")"}], "]"}], ".", 
   RowBox[{"(", GridBox[{
      {"a", "b"},
      {"b", "c"}
     }], ")"}], ".", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"}
     }], ")"}]}]}]], "Input",
 CellChangeTimes->{{3.795812893323601*^9, 3.7958129180626717`*^9}},
 CellLabel->
  "In[104]:=",ExpressionUUID->"c60b3ec2-343f-4d7b-b301-7f41a89f56cb"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{"b", "+", 
      RowBox[{"c", " ", "t"}]}], ")"}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{{3.7958129151284523`*^9, 3.795812918613076*^9}},
 CellLabel->
  "Out[104]=",ExpressionUUID->"2119d75b-4e1e-485c-a9b1-0e4be0b2e818"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"d", "=", 
   RowBox[{"(", GridBox[{
      {"d11", "d12", "d13"},
      {"d12", "d22", "d23"},
      {"d13", "d23", "d33"}
     }], ")"}]}], ";", 
  RowBox[{"T2", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"t"},
      {
       SuperscriptBox["t", "2"]}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"novale", "=", 
   RowBox[{
    RowBox[{"Transpose", "[", "T2", "]"}], ".", 
    RowBox[{"(", GridBox[{
       {"d11", "d12", "d13"},
       {"d12", "d22", "d23"},
       {"d13", "d23", "d33"}
      }], ")"}], ".", "T2"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"D", "[", 
   RowBox[{"novale", ",", 
    RowBox[{"{", 
     RowBox[{"t", ",", "2"}], "}"}]}], "]"}], "//", 
  "Simplify"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"3", "*", 
   RowBox[{
    RowBox[{"Transpose", "[", "T2", "]"}], ".", 
    RowBox[{"(", GridBox[{
       {"0", "1", "0"},
       {"0", "0", "2"},
       {"0", "0", "0"}
      }], ")"}], ".", 
    RowBox[{"(", GridBox[{
       {"0", "1", "0"},
       {"0", "0", "2"},
       {"0", "0", "0"}
      }], ")"}], ".", 
    RowBox[{"(", GridBox[{
       {"d11", "d12", "d13"},
       {"d12", "d22", "d23"},
       {"d13", "d23", "d33"}
      }], ")"}], ".", "T2"}]}], "//", "Expand"}]}], "Input",
 CellChangeTimes->{{3.795813511566963*^9, 3.7958136227093163`*^9}, {
  3.795813703599753*^9, 3.795813752623344*^9}},
 CellLabel->
  "In[160]:=",ExpressionUUID->"b1c0f38a-470c-4a5d-8b66-7b9d984bb70a"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"2", " ", "d13"}], "+", "d22", "+", 
      RowBox[{"6", " ", "t", " ", 
       RowBox[{"(", 
        RowBox[{"d23", "+", 
         RowBox[{"d33", " ", "t"}]}], ")"}]}]}], ")"}]}], "}"}], 
  "}"}]], "Output",
 CellChangeTimes->{
  3.795813533079377*^9, {3.795813574230978*^9, 3.7958136211298637`*^9}, {
   3.7958137046084127`*^9, 3.7958137765094624`*^9}},
 CellLabel->
  "Out[163]=",ExpressionUUID->"e671ca24-4d5f-4d17-8e97-ef398900c06b"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{"6", " ", "d13"}], "+", 
    RowBox[{"6", " ", "d23", " ", "t"}], "+", 
    RowBox[{"6", " ", "d33", " ", 
     SuperscriptBox["t", "2"]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{
  3.795813533079377*^9, {3.795813574230978*^9, 3.7958136211298637`*^9}, {
   3.7958137046084127`*^9, 3.795813776511056*^9}},
 CellLabel->
  "Out[164]=",ExpressionUUID->"0c8b9a83-d78e-453f-8621-ab76ae750dcc"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{"ClearAll", "[", "\"\<Global`*\>\"", "]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"t", "=", "0.5"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"\[Lambda]1", "=", 
   RowBox[{
    RowBox[{"3.4417", "*", 
     SuperscriptBox["t", "3"]}], "-", 
    RowBox[{"3.3354", "*", 
     SuperscriptBox["t", "2"]}], "+", 
    RowBox[{"0.8081", "*", "t"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"\[Lambda]2", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"-", "3.4415"}], "*", 
     SuperscriptBox["t", "3"]}], "+", 
    RowBox[{"6.989421", "*", 
     SuperscriptBox["t", "2"]}], "-", 
    RowBox[{"4.462218", "*", "t"}], "+", "0.91436"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"\[Lambda]3", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"-", "6.6793"}], "*", 
     SuperscriptBox["t", "3"]}], "+", 
    RowBox[{"8.1920", "*", 
     SuperscriptBox["t", "2"]}], "-", 
    RowBox[{"1.598257", "*", "t"}], "+", "0.08563"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"\[Lambda]4", "=", 
   RowBox[{
    RowBox[{"6.6793", "*", 
     SuperscriptBox["t", "3"]}], "-", 
    RowBox[{"11.8459", "*", 
     SuperscriptBox["t", "2"]}], "+", 
    RowBox[{"5.2523", "*", "t"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R", "=", 
   RowBox[{"(", GridBox[{
      {"r11", "r12", "r13", "r14"},
      {"r21", "r22", "r23", "r24"},
      {"r31", "r32", "r33", "r34"},
      {"r41", "r42", "r43", "r44"}
     }], ")"}]}], ";", 
  RowBox[{"Q", "=", 
   RowBox[{"(", GridBox[{
      {"1", "0", "0", "0"},
      {"0", "1", "0", "0"},
      {"0", "0", "1", "0"}
     }], ")"}]}], ";", " ", 
  RowBox[{"s", "=", 
   RowBox[{"(", GridBox[{
      {"0"},
      {"0"},
      {"0"},
      {"1"}
     }], ")"}]}], ";", 
  RowBox[{"\[Lambda]", "=", 
   RowBox[{"(", GridBox[{
      {"\[Lambda]1"},
      {"\[Lambda]2"},
      {"\[Lambda]3"},
      {"\[Lambda]4"}
     }], ")"}]}], ";", 
  RowBox[{"one", "=", 
   RowBox[{"(", GridBox[{
      {"1"},
      {"1"},
      {"1"},
      {"1"}
     }], ")"}]}], ";", 
  RowBox[{"\[Alpha]a", "=", 
   RowBox[{"(", GridBox[{
      {"\[Alpha]a1"},
      {"\[Alpha]a2"},
      {"\[Alpha]a3"}
     }], ")"}]}], ";", 
  RowBox[{"\[Alpha]c", "=", 
   RowBox[{"(", GridBox[{
      {"\[Alpha]c1"},
      {"\[Alpha]c2"},
      {"\[Alpha]c3"},
      {"\[Alpha]c4"}
     }], ")"}]}], ";", 
  RowBox[{"\[Beta]", "=", 
   RowBox[{"(", GridBox[{
      {"\[Beta]1"},
      {"\[Beta]2"},
      {"\[Beta]3"},
      {"\[Beta]4"}
     }], ")"}]}], ";", 
  RowBox[{"m", "=", 
   RowBox[{"(", GridBox[{
      {"m1"},
      {"m2"},
      {"m3"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"R", "=", 
   RowBox[{"(", GridBox[{
      {"3.6990", "0.8291", "2.8243", "1.3755"},
      {"3.5905", "6.2290", "3.5546", "4.8692"},
      {
       RowBox[{"-", "4.0820"}], 
       RowBox[{"-", "3.9524"}], 
       RowBox[{"-", "4.5086"}], 
       RowBox[{"-", "4.2921"}]},
      {"1", "1", "1", "1"}
     }], ")"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"ga", "=", 
   RowBox[{
    RowBox[{
     RowBox[{"Det", "[", "R", "]"}], "*", 
     RowBox[{"Det", "[", "R", "]"}]}], "+", 
    RowBox[{
     SuperscriptBox["\[Alpha]a", "\[Transpose]"], ".", 
     RowBox[{"(", 
      RowBox[{"m", "-", 
       RowBox[{"Q", ".", "R", ".", "\[Lambda]"}]}], ")"}]}], "+", 
    RowBox[{"\[Alpha]b", "*", 
     RowBox[{"(", 
      RowBox[{"1", "-", 
       RowBox[{
        SuperscriptBox["\[Lambda]", "\[Transpose]"], ".", "one"}]}], ")"}]}], 
    "+", 
    RowBox[{
     SuperscriptBox["\[Alpha]c", "\[Transpose]"], ".", 
     RowBox[{"(", 
      RowBox[{"one", "-", 
       RowBox[{
        SuperscriptBox["R", "\[Transpose]"], ".", "s"}]}], ")"}]}], "-", 
    RowBox[{
     SuperscriptBox["\[Beta]", "\[Transpose]"], ".", "\[Lambda]"}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"deriv", "=", 
  RowBox[{
   RowBox[{
    RowBox[{
     RowBox[{"2", "*", 
      RowBox[{"Det", "[", "R", "]"}], "*", 
      RowBox[{"Det", "[", "R", "]"}], "*", 
      RowBox[{"Inverse", "[", 
       SuperscriptBox["R", "\[Transpose]"], "]"}]}], "-", 
     RowBox[{
      SuperscriptBox["Q", "\[Transpose]"], ".", "\[Alpha]a", ".", 
      SuperscriptBox["\[Lambda]", "\[Transpose]"]}], "-", 
     RowBox[{"s", ".", 
      SuperscriptBox["\[Alpha]c", "\[Transpose]"]}]}], "//", "Expand"}], "//",
    "MatrixForm"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"deriv", "[", 
    RowBox[{"[", 
     RowBox[{"4", ",", "4"}], "]"}], "]"}], "-", 
   RowBox[{
    SubscriptBox["\[PartialD]", "r44"], "ga"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"Simplify", "[", 
   RowBox[{"deriv", ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{
       RowBox[{
        SuperscriptBox["R", "\[Transpose]"], ".", "s"}], "\[Equal]", "one"}], 
      ",", 
      RowBox[{
       RowBox[{
        SuperscriptBox["\[Lambda]", "\[Transpose]"], ".", "one"}], "==", 
       "1"}]}], "}"}]}], "]"}], ";"}], "\[IndentingNewLine]"}], "Input",
 CellChangeTimes->{{3.793907608796749*^9, 3.793907609014164*^9}, {
  3.7939076708525267`*^9, 3.7939081295323844`*^9}, {3.793908628787218*^9, 
  3.7939086325202723`*^9}, {3.793908681098915*^9, 3.7939087615564613`*^9}, {
  3.7939088312128105`*^9, 3.793908831568859*^9}, {3.793908863173098*^9, 
  3.7939091818798604`*^9}},
 CellLabel->
  "In[399]:=",ExpressionUUID->"af52c698-e42a-48b5-80c1-11296f534362"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"-", "0.11792865620034794`"}], "-", 
       RowBox[{"0.00041250000000003784`", " ", "\[Alpha]a1"}]}], 
      RowBox[{"0.4285834397454088`", "\[VeryThinSpace]", "-", 
       RowBox[{"0.00041874999999991225`", " ", "\[Alpha]a1"}]}], 
      RowBox[{"0.5580276388629178`", "\[VeryThinSpace]", "-", 
       RowBox[{"0.49958900000000006`", " ", "\[Alpha]a1"}]}], 
      RowBox[{
       RowBox[{"-", "0.8686824224079788`"}], "-", 
       RowBox[{"0.49958749999999963`", " ", "\[Alpha]a1"}]}]},
     {
      RowBox[{
       RowBox[{"-", "0.28972970329738923`"}], "-", 
       RowBox[{"0.00041250000000003784`", " ", "\[Alpha]a2"}]}], 
      RowBox[{"0.6257303150317514`", "\[VeryThinSpace]", "-", 
       RowBox[{"0.00041874999999991225`", " ", "\[Alpha]a2"}]}], 
      RowBox[{"0.7006391563672231`", "\[VeryThinSpace]", "-", 
       RowBox[{"0.49958900000000006`", " ", "\[Alpha]a2"}]}], 
      RowBox[{
       RowBox[{"-", "1.036639768101585`"}], "-", 
       RowBox[{"0.49958749999999963`", " ", "\[Alpha]a2"}]}]},
     {
      RowBox[{"0.9700860547421838`", "\[VeryThinSpace]", "-", 
       RowBox[{"0.00041250000000003784`", " ", "\[Alpha]a3"}]}], 
      RowBox[{
       RowBox[{"-", "0.9314244094115053`"}], "-", 
       RowBox[{"0.00041874999999991225`", " ", "\[Alpha]a3"}]}], 
      RowBox[{
       RowBox[{"-", "1.907043929801153`"}], "-", 
       RowBox[{"0.49958900000000006`", " ", "\[Alpha]a3"}]}], 
      RowBox[{"1.8683822844704743`", "\[VeryThinSpace]", "-", 
       RowBox[{"0.49958749999999963`", " ", "\[Alpha]a3"}]}]},
     {
      RowBox[{"5.736669093458153`", "\[VeryThinSpace]", "-", "\[Alpha]c1"}], 
      RowBox[{
       RowBox[{"-", "7.634089278957536`"}], "-", "\[Alpha]c2"}], 
      RowBox[{
       RowBox[{"-", "12.364342448538753`"}], "-", "\[Alpha]c3"}], 
      RowBox[{"14.562047853064332`", "\[VeryThinSpace]", "-", "\[Alpha]c4"}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{
  3.793908762084051*^9, 3.7939090301539354`*^9, {3.7939091129380903`*^9, 
   3.7939091838047123`*^9}},
 CellLabel->
  "Out[408]//MatrixForm=",ExpressionUUID->"b825cd79-32fe-4ead-965d-\
aa55aeb9d94d"],

Cell[BoxData[
 TemplateBox[{
  "Part", "partw", 
   "\"Part \\!\\(\\*RowBox[{\\\"4\\\"}]\\) of \\!\\(\\*TagBox[RowBox[{\\\"(\\\
\", \\\"\[NoBreak]\\\", RowBox[{\\\"\[LeftSkeleton]\\\", \\\"1\\\", \\\"\
\[RightSkeleton]\\\"}], \\\"\[NoBreak]\\\", \\\")\\\"}], Function[BoxForm`e$, \
MatrixForm[BoxForm`e$]]]\\) does not exist.\"", 2, 409, 23, 
   23525273341457539182, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{{3.793909152898972*^9, 3.793909183808703*^9}},
 CellLabel->
  "During evaluation of \
In[399]:=",ExpressionUUID->"fe5059ea-fd5e-4f63-87b5-f0b0f494bf2c"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"matrixA", "//", "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.793397276399782*^9, 3.7933972776653957`*^9}},
 CellLabel->
  "In[1297]:=",ExpressionUUID->"ee15eabb-4e5c-4beb-bf13-2f1b5481d4ba"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      FractionBox[
       SuperscriptBox["t0", "2"], 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}], ")"}]}]], 
      RowBox[{"-", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{"-", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      FractionBox[
       SuperscriptBox["t0", "2"], 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}], ")"}]}]]},
     {
      RowBox[{
       RowBox[{"-", 
        FractionBox["t0", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}]]}], "-", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["t1", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}]]}], "-", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["t1", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "+", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["t0", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "+", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}]},
     {
      RowBox[{
       FractionBox["1", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox["t0", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "-", 
       FractionBox[
        RowBox[{"2", " ", "t0"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["1", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["t0", "2"], "-", 
            SuperscriptBox["t1", "2"]}], ")"}]}]]}], "-", 
       FractionBox["t1", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "+", 
       FractionBox[
        RowBox[{"2", " ", "t1"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["1", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["t0", "2"], "-", 
            SuperscriptBox["t1", "2"]}], ")"}]}]]}], "-", 
       FractionBox["t1", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "+", 
       FractionBox[
        RowBox[{"2", " ", "t1"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["1", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox["t0", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "-", 
       FractionBox[
        RowBox[{"2", " ", "t0"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}]},
     {
      RowBox[{
       RowBox[{"-", 
        FractionBox["1", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["t0", "2"], "-", 
            SuperscriptBox["t1", "2"]}], ")"}]}]]}], "+", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        RowBox[{"2", " ", "t0"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["1", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["t0", "2"], "-", 
            SuperscriptBox["t1", "2"]}], ")"}]}]]}], "+", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        RowBox[{"2", " ", "t1"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["1", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        RowBox[{"2", " ", "t1"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["1", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        RowBox[{"2", " ", "t0"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}]},
     {
      RowBox[{"-", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      FractionBox["1", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}], ")"}]}]], 
      FractionBox["1", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}], ")"}]}]], 
      RowBox[{"-", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{3.793397278095249*^9},
 CellLabel->
  "Out[1297]//MatrixForm=",ExpressionUUID->"4e33b403-376b-4b17-bea7-\
2162b7a52745"]
}, Open  ]],

Cell[BoxData["matrixB"], "Input",
 CellLabel->
  "In[1150]:=",ExpressionUUID->"db567b3c-c9ae-4100-b1e1-f7100ab1bda3"],

Cell[CellGroupData[{

Cell[BoxData["coeffW0"], "Input",
 CellLabel->
  "In[1152]:=",ExpressionUUID->"853f0d37-70d7-4018-8df9-8564288c6335"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   FractionBox[
    SuperscriptBox["t0", "2"], 
    RowBox[{"2", " ", 
     RowBox[{"(", 
      RowBox[{
       SuperscriptBox["t0", "2"], "-", 
       SuperscriptBox["t1", "2"]}], ")"}]}]], ",", 
   RowBox[{
    RowBox[{"-", 
     FractionBox["t0", 
      RowBox[{
       SuperscriptBox["t0", "2"], "-", 
       SuperscriptBox["t1", "2"]}]]}], "-", 
    FractionBox[
     SuperscriptBox["t0", "2"], 
     RowBox[{"2", " ", 
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["t0", "2"], "-", 
        SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
    FractionBox[
     SuperscriptBox["t0", "2"], 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["t0", "2"], "-", 
        SuperscriptBox["t1", "2"]}], ")"}]}]]}], ",", 
   RowBox[{
    FractionBox["1", 
     RowBox[{"2", " ", 
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["t0", "2"], "-", 
        SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
    FractionBox["t0", 
     RowBox[{
      SuperscriptBox["t0", "2"], "-", 
      SuperscriptBox["t1", "2"]}]], "-", 
    FractionBox[
     RowBox[{"2", " ", "t0"}], 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["t0", "2"], "-", 
        SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
    FractionBox[
     SuperscriptBox["t0", "2"], 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["t0", "2"], "-", 
        SuperscriptBox["t1", "2"]}], ")"}]}]]}], ",", 
   RowBox[{
    RowBox[{"-", 
     FractionBox["1", 
      RowBox[{"2", " ", 
       RowBox[{"(", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}], ")"}]}]]}], "+", 
    FractionBox["1", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["t0", "2"], "-", 
        SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
    FractionBox[
     RowBox[{"2", " ", "t0"}], 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["t0", "2"], "-", 
        SuperscriptBox["t1", "2"]}], ")"}]}]]}], ",", 
   RowBox[{"-", 
    FractionBox["1", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["t0", "2"], "-", 
        SuperscriptBox["t1", "2"]}], ")"}]}]]}]}], "}"}]], "Output",
 CellChangeTimes->{3.793397196490802*^9},
 CellLabel->
  "Out[1152]=",ExpressionUUID->"d985c745-8a88-4043-8e84-8c9e01e57fee"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"matrixA", "//", "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.7933970813332*^9, 3.793397084157672*^9}},
 CellLabel->
  "In[1151]:=",ExpressionUUID->"374bcc73-2b3a-46e1-9c45-8d4036582458"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      FractionBox[
       SuperscriptBox["t0", "2"], 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}], ")"}]}]], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["t0", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}]]}], "-", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["1", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox["t0", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "-", 
       FractionBox[
        RowBox[{"2", " ", "t0"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["1", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["t0", "2"], "-", 
            SuperscriptBox["t1", "2"]}], ")"}]}]]}], "+", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        RowBox[{"2", " ", "t0"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{"-", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}]},
     {
      RowBox[{"-", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["t1", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}]]}], "-", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["1", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["t0", "2"], "-", 
            SuperscriptBox["t1", "2"]}], ")"}]}]]}], "-", 
       FractionBox["t1", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "+", 
       FractionBox[
        RowBox[{"2", " ", "t1"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["1", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["t0", "2"], "-", 
            SuperscriptBox["t1", "2"]}], ")"}]}]]}], "+", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        RowBox[{"2", " ", "t1"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      FractionBox["1", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}], ")"}]}]]},
     {
      RowBox[{"-", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["t1", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "+", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       RowBox[{"-", 
        FractionBox["1", 
         RowBox[{"2", " ", 
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["t0", "2"], "-", 
            SuperscriptBox["t1", "2"]}], ")"}]}]]}], "-", 
       FractionBox["t1", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "+", 
       FractionBox[
        RowBox[{"2", " ", "t1"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox[
        SuperscriptBox["t1", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["1", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        RowBox[{"2", " ", "t1"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      FractionBox["1", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}], ")"}]}]]},
     {
      FractionBox[
       SuperscriptBox["t0", "2"], 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["t0", "2"], "-", 
          SuperscriptBox["t1", "2"]}], ")"}]}]], 
      RowBox[{
       FractionBox["t0", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "+", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["1", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "+", 
       FractionBox["t0", 
        RowBox[{
         SuperscriptBox["t0", "2"], "-", 
         SuperscriptBox["t1", "2"]}]], "-", 
       FractionBox[
        RowBox[{"2", " ", "t0"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        SuperscriptBox["t0", "2"], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{
       FractionBox["1", 
        RowBox[{"2", " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]], "-", 
       FractionBox[
        RowBox[{"2", " ", "t0"}], 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}], 
      RowBox[{"-", 
       FractionBox["1", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{"2", "+", "t0", "+", "t1"}], ")"}], " ", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["t0", "2"], "-", 
           SuperscriptBox["t1", "2"]}], ")"}]}]]}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.793397076052328*^9, 3.793397084676282*^9}},
 CellLabel->
  "Out[1151]//MatrixForm=",ExpressionUUID->"44aab92f-74fe-475c-af4f-\
2d5a571950b0"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["c0"], "Input",
 CellChangeTimes->{{3.7933940822327385`*^9, 3.7933940825678673`*^9}},
 CellLabel->
  "In[385]:=",ExpressionUUID->"faab1761-77d7-482d-b3d2-88432768a06a"],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{{3.793393948130289*^9, 3.7933939941313887`*^9}, {
  3.793394074883399*^9, 3.7933940827214537`*^9}},
 CellLabel->
  "Out[385]=",ExpressionUUID->"72035b20-aabb-4aff-b902-b1d5271c2a38"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["s"], "Input",
 CellChangeTimes->{{3.793394086599083*^9, 3.7933940872882423`*^9}},
 CellLabel->
  "In[386]:=",ExpressionUUID->"9a29d74c-2224-46c1-8e4a-cac41756618a"],

Cell[BoxData[
 RowBox[{"{", "}"}]], "Output",
 CellChangeTimes->{3.793394087542554*^9},
 CellLabel->
  "Out[386]=",ExpressionUUID->"297d80f1-9eda-485d-b989-86bf9ebdf5a7"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"s", "=", 
  RowBox[{"Solve", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"c3", "\[Equal]", "0"}], "&&", 
     RowBox[{"c2", "\[Equal]", "0"}], "&&", 
     RowBox[{"c1", "\[Equal]", "0"}], "&&", 
     RowBox[{"c0", "\[Equal]", "1"}]}], ",", 
    RowBox[{"{", 
     RowBox[{"a", ",", "b"}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{3.793394026046094*^9},
 CellLabel->
  "In[363]:=",ExpressionUUID->"791ad914-3654-4584-9ae6-088fce9864db"],

Cell[BoxData[
 RowBox[{"{", "}"}]], "Output",
 CellChangeTimes->{3.7933940263502817`*^9},
 CellLabel->
  "Out[363]=",ExpressionUUID->"b73c6168-aa25-49e5-a819-dee0ea7d8235"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["c3"], "Input",
 CellChangeTimes->{{3.793392905301052*^9, 3.7933929053948073`*^9}},
 CellLabel->
  "In[254]:=",ExpressionUUID->"f480f4ee-63b1-4edd-b909-52e72561c413"],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{3.793392905549363*^9},
 CellLabel->
  "Out[254]=",ExpressionUUID->"790c0b77-c8d9-4695-964a-e4ac561ff9c2"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["c2"], "Input",
 CellChangeTimes->{{3.7933929065706315`*^9, 3.7933929066364555`*^9}},
 CellLabel->
  "In[255]:=",ExpressionUUID->"66697429-8a3e-4583-92c6-10bb723185f6"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   FractionBox[
    RowBox[{
     RowBox[{"-", "1"}], "-", 
     RowBox[{"2", " ", "t0"}]}], 
    RowBox[{
     RowBox[{"-", 
      SuperscriptBox["t0", "2"]}], "-", 
     RowBox[{"2", " ", 
      SuperscriptBox["t0", "2"], " ", "t1"}], "+", 
     SuperscriptBox["t1", "2"], "+", 
     RowBox[{"2", " ", "t0", " ", 
      SuperscriptBox["t1", "2"]}]}]]}], "-", 
  FractionBox[
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{"-", "1"}], "-", 
      RowBox[{"2", " ", "t0"}]}], ")"}], " ", "t1"}], 
   RowBox[{
    RowBox[{"-", 
     SuperscriptBox["t0", "2"]}], "-", 
    RowBox[{"2", " ", 
     SuperscriptBox["t0", "2"], " ", "t1"}], "+", 
    SuperscriptBox["t1", "2"], "+", 
    RowBox[{"2", " ", "t0", " ", 
     SuperscriptBox["t1", "2"]}]}]], "-", 
  FractionBox[
   RowBox[{"1", "+", 
    RowBox[{"2", " ", "t1"}]}], 
   RowBox[{
    RowBox[{"-", 
     SuperscriptBox["t0", "2"]}], "-", 
    RowBox[{"2", " ", 
     SuperscriptBox["t0", "2"], " ", "t1"}], "+", 
    SuperscriptBox["t1", "2"], "+", 
    RowBox[{"2", " ", "t0", " ", 
     SuperscriptBox["t1", "2"]}]}]], "-", 
  FractionBox[
   RowBox[{"2", " ", "t0", " ", 
    RowBox[{"(", 
     RowBox[{"1", "+", 
      RowBox[{"2", " ", "t1"}]}], ")"}]}], 
   RowBox[{
    RowBox[{"-", 
     SuperscriptBox["t0", "2"]}], "-", 
    RowBox[{"2", " ", 
     SuperscriptBox["t0", "2"], " ", "t1"}], "+", 
    SuperscriptBox["t1", "2"], "+", 
    RowBox[{"2", " ", "t0", " ", 
     SuperscriptBox["t1", "2"]}]}]]}]], "Output",
 CellChangeTimes->{3.7933929067990465`*^9},
 CellLabel->
  "Out[255]=",ExpressionUUID->"c1cee358-9a3e-48cc-aabc-9cc5cf51bdd0"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["c1"], "Input",
 CellChangeTimes->{{3.793392907508151*^9, 3.793392907573948*^9}},
 CellLabel->
  "In[256]:=",ExpressionUUID->"2edbd1a5-afa9-4425-9498-ef71fe949e5d"],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{3.7933929077505045`*^9},
 CellLabel->
  "Out[256]=",ExpressionUUID->"34e41108-722f-45cd-ba2c-27b07f3583be"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["c0"], "Input",
 CellChangeTimes->{{3.7933929090539865`*^9, 3.793392909129819*^9}},
 CellLabel->
  "In[257]:=",ExpressionUUID->"aec5497d-599d-402f-89a3-f89340de5d26"],

Cell[BoxData[
 RowBox[{
  RowBox[{"-", 
   FractionBox[
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       RowBox[{"-", "1"}], "-", 
       RowBox[{"2", " ", "t0"}]}], ")"}], " ", 
     SuperscriptBox["t1", "2"]}], 
    RowBox[{
     RowBox[{"-", 
      SuperscriptBox["t0", "2"]}], "-", 
     RowBox[{"2", " ", 
      SuperscriptBox["t0", "2"], " ", "t1"}], "+", 
     SuperscriptBox["t1", "2"], "+", 
     RowBox[{"2", " ", "t0", " ", 
      SuperscriptBox["t1", "2"]}]}]]}], "-", 
  FractionBox[
   RowBox[{
    SuperscriptBox["t0", "2"], " ", 
    RowBox[{"(", 
     RowBox[{"1", "+", 
      RowBox[{"2", " ", "t1"}]}], ")"}]}], 
   RowBox[{
    RowBox[{"-", 
     SuperscriptBox["t0", "2"]}], "-", 
    RowBox[{"2", " ", 
     SuperscriptBox["t0", "2"], " ", "t1"}], "+", 
    SuperscriptBox["t1", "2"], "+", 
    RowBox[{"2", " ", "t0", " ", 
     SuperscriptBox["t1", "2"]}]}]]}]], "Output",
 CellChangeTimes->{3.793392909269442*^9},
 CellLabel->
  "Out[257]=",ExpressionUUID->"a9f991eb-1dcc-442b-a6b5-da12755966e3"]
}, Open  ]],

Cell[BoxData[
 RowBox[{"A", "=", 
  RowBox[{"(", GridBox[{
     {"\[SelectionPlaceholder]", "\[Placeholder]", "\[Placeholder]", 
      "\[Placeholder]"},
     {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"},
     {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"},
     {"\[Placeholder]", "\[Placeholder]", "\[Placeholder]", "\[Placeholder]"}
    }], ")"}]}]], "Input",
 CellChangeTimes->{{3.792787481684066*^9, 3.7927874818478527`*^9}, {
  3.792787519887969*^9, 
  3.79278754031736*^9}},ExpressionUUID->"9b7f3a75-90ee-47da-89bd-\
0e40e81c61bd"],

Cell[BoxData[
 RowBox[{"Minimize", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"Det", "[", 
      RowBox[{"(", GridBox[{
         {"x1", "x2", "x3", "x4"},
         {"y1", "y2", "y3", "y4"},
         {"z1", "z2", "z3", "z4"},
         {"1", "1", "1", "1"}
        }], ")"}], "]"}], ",", 
     RowBox[{"ax", "\[Equal]", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"l1a", "*", " ", "x1"}], "+", 
        RowBox[{"l2a", " ", "*", "x2"}], "+", 
        RowBox[{"l3a", "*", " ", "x3"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}], "*", " ", 
         "x4"}]}], ")"}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "ay"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1a", " ", "*", "y1"}], "+", 
       RowBox[{"l2a", " ", "*", "y2"}], "+", 
       RowBox[{"l3a", "*", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}], "*", " ", 
        "y4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "az"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1a", "*", " ", "z1"}], "+", 
       RowBox[{"l2a", "*", " ", "z2"}], "+", 
       RowBox[{"l3a", " ", "*", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1a"}], "-", "l2a", "-", "l3a"}], ")"}], " ", "*", 
        "z4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "bx"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1b", "*", " ", "x1"}], "+", 
       RowBox[{"l2b", "*", " ", "x2"}], "+", 
       RowBox[{"l3b", " ", "*", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}], "*", " ", 
        "x4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "by"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1b", " ", "*", "y1"}], "+", 
       RowBox[{"l2b", " ", "*", "y2"}], "+", 
       RowBox[{"l3b", " ", "*", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}], "*", " ", 
        "y4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "bz"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1b", " ", "*", "z1"}], "+", 
       RowBox[{"l2b", " ", "*", "z2"}], "+", 
       RowBox[{"l3b", "*", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1b"}], "-", "l2b", "-", "l3b"}], ")"}], "*", " ", 
        "z4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "cx"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1c", "*", " ", "x1"}], "+", 
       RowBox[{"l2c", "*", " ", "x2"}], "+", 
       RowBox[{"l3c", "*", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}], "*", " ", 
        "x4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "cy"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1c", " ", "*", "y1"}], "+", 
       RowBox[{"l2c", " ", "*", "y2"}], "+", 
       RowBox[{"l3c", "*", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}], "*", " ", 
        "y4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "cz"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1c", " ", "*", "z1"}], "+", 
       RowBox[{"l2c", " ", "*", "z2"}], "+", 
       RowBox[{"l3c", "*", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"-", "l1c"}], "-", "l2c", "-", "l3c"}], ")"}], "*", " ", 
        "z4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "dx"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1d", " ", "*", "x1"}], "+", 
       RowBox[{"l2d", " ", "*", "x2"}], "+", 
       RowBox[{"l3d", "*", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], "*", " ", 
        "x4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "dy"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1d", " ", "*", "y1"}], "+", 
       RowBox[{"l2d", "*", " ", "y2"}], "+", 
       RowBox[{"l3d", "*", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], "*", " ", 
        "y4"}]}]}], ",", 
     RowBox[{
      RowBox[{"\\\[IndentingNewLine]", "dz"}], "\[Equal]", 
      RowBox[{
       RowBox[{"l1d", " ", "*", "z1"}], "+", 
       RowBox[{"l2d", "*", " ", "z2"}], "+", 
       RowBox[{"l3d", " ", "*", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], "*", " ", 
        "z4"}]}]}], ",", "\\\[IndentingNewLine]"}], "  ", "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
    "x1", ",", "y1", ",", "z1", ",", "x2", ",", "y2", ",", "z2", ",", "x3", 
     ",", "y3", ",", "z3", ",", "x4", ",", "y4", ",", "z4", ",", "l1a", ",", 
     "l2a", ",", "l3a", ",", "l1b", ",", "l2b", ",", "l3b", ",", "l1c", ",", 
     "l2c", ",", "l3c", ",", "l1d", ",", "l2d", ",", "l3d"}], "}"}]}], 
  "]"}]], "Input",ExpressionUUID->"71e3761a-ee9f-4db1-82e8-1df90fe9278d"],

Cell[CellGroupData[{

Cell[BoxData["ax"], "Input",
 CellChangeTimes->{{3.792436052790268*^9, 3.792436053034342*^9}},
 CellLabel->
  "In[266]:=",ExpressionUUID->"ffb16e15-22fe-4df9-8071-0d2aa714956d"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"-", 
    SuperscriptBox["r112", "2"]}], " ", "v1x"}], "-", 
  RowBox[{
   SuperscriptBox["r122", "2"], " ", "v1x"}], "+", 
  RowBox[{
   SuperscriptBox["s112", "2"], " ", "v1x"}], "+", 
  RowBox[{
   SuperscriptBox["s122", "2"], " ", "v1x"}], "-", 
  RowBox[{
   SuperscriptBox["r212", "2"], " ", "v2x"}], "-", 
  RowBox[{
   SuperscriptBox["r222", "2"], " ", "v2x"}], "+", 
  RowBox[{
   SuperscriptBox["s212", "2"], " ", "v2x"}], "+", 
  RowBox[{
   SuperscriptBox["s222", "2"], " ", "v2x"}], "-", 
  RowBox[{
   SuperscriptBox["r312", "2"], " ", "v3x"}], "-", 
  RowBox[{
   SuperscriptBox["r322", "2"], " ", "v3x"}], "+", 
  RowBox[{
   SuperscriptBox["s312", "2"], " ", "v3x"}], "+", 
  RowBox[{
   SuperscriptBox["s322", "2"], " ", "v3x"}], "+", 
  RowBox[{
   SuperscriptBox["r112", "2"], " ", "v4x"}], "+", 
  RowBox[{
   SuperscriptBox["r122", "2"], " ", "v4x"}], "+", 
  RowBox[{
   SuperscriptBox["r212", "2"], " ", "v4x"}], "+", 
  RowBox[{
   SuperscriptBox["r222", "2"], " ", "v4x"}], "+", 
  RowBox[{
   SuperscriptBox["r312", "2"], " ", "v4x"}], "+", 
  RowBox[{
   SuperscriptBox["r322", "2"], " ", "v4x"}], "-", 
  RowBox[{
   SuperscriptBox["s112", "2"], " ", "v4x"}], "-", 
  RowBox[{
   SuperscriptBox["s122", "2"], " ", "v4x"}], "-", 
  RowBox[{
   SuperscriptBox["s212", "2"], " ", "v4x"}], "-", 
  RowBox[{
   SuperscriptBox["s222", "2"], " ", "v4x"}], "-", 
  RowBox[{
   SuperscriptBox["s312", "2"], " ", "v4x"}], "-", 
  RowBox[{
   SuperscriptBox["s322", "2"], " ", "v4x"}]}]], "Output",
 CellChangeTimes->{3.7924360535104647`*^9},
 CellLabel->
  "Out[266]=",ExpressionUUID->"19647d73-6a2c-4d64-914e-a4dbb90c8c2d"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["polynomial"], "Input",
 CellLabel->
  "In[235]:=",ExpressionUUID->"f514e9f4-82cf-4b1e-9bce-2b94a2fad63e"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     SuperscriptBox["r111", "2"], "+", 
     SuperscriptBox["r121", "2"]}], ")"}], " ", "v1x"}], "+", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     SuperscriptBox["r211", "2"], "+", 
     SuperscriptBox["r221", "2"]}], ")"}], " ", "v2x"}], "+", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     SuperscriptBox["r311", "2"], "+", 
     SuperscriptBox["r321", "2"]}], ")"}], " ", "v3x"}], "+", 
  RowBox[{"t", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"-", 
       RowBox[{"(", 
        RowBox[{
         SuperscriptBox["r111", "2"], "+", 
         SuperscriptBox["r121", "2"]}], ")"}]}], " ", "v1x"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["s111", "2"], "+", 
        SuperscriptBox["s121", "2"]}], ")"}], " ", "v1x"}], "-", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["r211", "2"], "+", 
        SuperscriptBox["r221", "2"]}], ")"}], " ", "v2x"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["s211", "2"], "+", 
        SuperscriptBox["s221", "2"]}], ")"}], " ", "v2x"}], "-", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["r311", "2"], "+", 
        SuperscriptBox["r321", "2"]}], ")"}], " ", "v3x"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["s311", "2"], "+", 
        SuperscriptBox["s321", "2"]}], ")"}], " ", "v3x"}]}], ")"}]}], "+", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{"1", "-", 
     SuperscriptBox["r111", "2"], "-", 
     SuperscriptBox["r121", "2"], "-", 
     SuperscriptBox["r211", "2"], "-", 
     SuperscriptBox["r221", "2"], "-", 
     SuperscriptBox["r311", "2"], "-", 
     SuperscriptBox["r321", "2"], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        SuperscriptBox["r111", "2"], "+", 
        SuperscriptBox["r121", "2"], "+", 
        SuperscriptBox["r211", "2"], "+", 
        SuperscriptBox["r221", "2"], "+", 
        SuperscriptBox["r311", "2"], "+", 
        SuperscriptBox["r321", "2"], "-", 
        SuperscriptBox["s111", "2"], "-", 
        SuperscriptBox["s121", "2"], "-", 
        SuperscriptBox["s211", "2"], "-", 
        SuperscriptBox["s221", "2"], "-", 
        SuperscriptBox["s311", "2"], "-", 
        SuperscriptBox["s321", "2"]}], ")"}], " ", "t"}]}], ")"}], " ", 
   "v4x"}], "+", 
  RowBox[{"t", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"r111", " ", "r112"}], "+", 
        RowBox[{"r121", " ", "r122"}]}], ")"}], " ", "v1x"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"r211", " ", "r212"}], "+", 
        RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"r311", " ", "r312"}], "+", 
        RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
     RowBox[{"t", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"-", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"r111", " ", "r112"}], "+", 
            RowBox[{"r121", " ", "r122"}]}], ")"}]}], " ", "v1x"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"s111", " ", "s112"}], "+", 
           RowBox[{"s121", " ", "s122"}]}], ")"}], " ", "v1x"}], "-", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"r211", " ", "r212"}], "+", 
           RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"s211", " ", "s212"}], "+", 
           RowBox[{"s221", " ", "s222"}]}], ")"}], " ", "v2x"}], "-", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"r311", " ", "r312"}], "+", 
           RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"s311", " ", "s312"}], "+", 
           RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "v3x"}]}], ")"}]}], 
     "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "r111"}], " ", "r112"}], "-", 
        RowBox[{"r121", " ", "r122"}], "-", 
        RowBox[{"r211", " ", "r212"}], "-", 
        RowBox[{"r221", " ", "r222"}], "-", 
        RowBox[{"r311", " ", "r312"}], "-", 
        RowBox[{"r321", " ", "r322"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"r111", " ", "r112"}], "+", 
           RowBox[{"r121", " ", "r122"}], "+", 
           RowBox[{"r211", " ", "r212"}], "+", 
           RowBox[{"r221", " ", "r222"}], "+", 
           RowBox[{"r311", " ", "r312"}], "+", 
           RowBox[{"r321", " ", "r322"}], "-", 
           RowBox[{"s111", " ", "s112"}], "-", 
           RowBox[{"s121", " ", "s122"}], "-", 
           RowBox[{"s211", " ", "s212"}], "-", 
           RowBox[{"s221", " ", "s222"}], "-", 
           RowBox[{"s311", " ", "s312"}], "-", 
           RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "t"}]}], ")"}], " ", 
      "v4x"}]}], ")"}]}], "+", 
  RowBox[{"t", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"r111", " ", "r112"}], "+", 
        RowBox[{"r121", " ", "r122"}]}], ")"}], " ", "v1x"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"r211", " ", "r212"}], "+", 
        RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{"r311", " ", "r312"}], "+", 
        RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
     RowBox[{"t", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"-", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{"r111", " ", "r112"}], "+", 
            RowBox[{"r121", " ", "r122"}]}], ")"}]}], " ", "v1x"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"s111", " ", "s112"}], "+", 
           RowBox[{"s121", " ", "s122"}]}], ")"}], " ", "v1x"}], "-", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"r211", " ", "r212"}], "+", 
           RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"s211", " ", "s212"}], "+", 
           RowBox[{"s221", " ", "s222"}]}], ")"}], " ", "v2x"}], "-", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"r311", " ", "r312"}], "+", 
           RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"s311", " ", "s312"}], "+", 
           RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "v3x"}]}], ")"}]}], 
     "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"-", "r111"}], " ", "r112"}], "-", 
        RowBox[{"r121", " ", "r122"}], "-", 
        RowBox[{"r211", " ", "r212"}], "-", 
        RowBox[{"r221", " ", "r222"}], "-", 
        RowBox[{"r311", " ", "r312"}], "-", 
        RowBox[{"r321", " ", "r322"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"r111", " ", "r112"}], "+", 
           RowBox[{"r121", " ", "r122"}], "+", 
           RowBox[{"r211", " ", "r212"}], "+", 
           RowBox[{"r221", " ", "r222"}], "+", 
           RowBox[{"r311", " ", "r312"}], "+", 
           RowBox[{"r321", " ", "r322"}], "-", 
           RowBox[{"s111", " ", "s112"}], "-", 
           RowBox[{"s121", " ", "s122"}], "-", 
           RowBox[{"s211", " ", "s212"}], "-", 
           RowBox[{"s221", " ", "s222"}], "-", 
           RowBox[{"s311", " ", "s312"}], "-", 
           RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "t"}]}], ")"}], " ", 
      "v4x"}], "+", 
     RowBox[{"t", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["r112", "2"], "+", 
           SuperscriptBox["r122", "2"]}], ")"}], " ", "v1x"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["r212", "2"], "+", 
           SuperscriptBox["r222", "2"]}], ")"}], " ", "v2x"}], "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["r312", "2"], "+", 
           SuperscriptBox["r322", "2"]}], ")"}], " ", "v3x"}], "+", 
        RowBox[{"t", " ", 
         RowBox[{"(", 
          RowBox[{
           RowBox[{
            RowBox[{"-", 
             RowBox[{"(", 
              RowBox[{
               SuperscriptBox["r112", "2"], "+", 
               SuperscriptBox["r122", "2"]}], ")"}]}], " ", "v1x"}], "+", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              SuperscriptBox["s112", "2"], "+", 
              SuperscriptBox["s122", "2"]}], ")"}], " ", "v1x"}], "-", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              SuperscriptBox["r212", "2"], "+", 
              SuperscriptBox["r222", "2"]}], ")"}], " ", "v2x"}], "+", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              SuperscriptBox["s212", "2"], "+", 
              SuperscriptBox["s222", "2"]}], ")"}], " ", "v2x"}], "-", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              SuperscriptBox["r312", "2"], "+", 
              SuperscriptBox["r322", "2"]}], ")"}], " ", "v3x"}], "+", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              SuperscriptBox["s312", "2"], "+", 
              SuperscriptBox["s322", "2"]}], ")"}], " ", "v3x"}]}], ")"}]}], 
        "+", 
        RowBox[{
         RowBox[{"(", 
          RowBox[{
           RowBox[{"-", 
            SuperscriptBox["r112", "2"]}], "-", 
           SuperscriptBox["r122", "2"], "-", 
           SuperscriptBox["r212", "2"], "-", 
           SuperscriptBox["r222", "2"], "-", 
           SuperscriptBox["r312", "2"], "-", 
           SuperscriptBox["r322", "2"], "+", 
           RowBox[{
            RowBox[{"(", 
             RowBox[{
              SuperscriptBox["r112", "2"], "+", 
              SuperscriptBox["r122", "2"], "+", 
              SuperscriptBox["r212", "2"], "+", 
              SuperscriptBox["r222", "2"], "+", 
              SuperscriptBox["r312", "2"], "+", 
              SuperscriptBox["r322", "2"], "-", 
              SuperscriptBox["s112", "2"], "-", 
              SuperscriptBox["s122", "2"], "-", 
              SuperscriptBox["s212", "2"], "-", 
              SuperscriptBox["s222", "2"], "-", 
              SuperscriptBox["s312", "2"], "-", 
              SuperscriptBox["s322", "2"]}], ")"}], " ", "t"}]}], ")"}], " ", 
         "v4x"}]}], ")"}]}]}], ")"}]}]}]], "Output",
 CellChangeTimes->{3.792436023820703*^9},
 CellLabel->
  "Out[235]=",ExpressionUUID->"cf3d22b7-2c4a-49db-b0d1-070295f21364"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["polynomial"], "Input",
 CellLabel->
  "In[221]:=",ExpressionUUID->"9c75bd1a-2866-4f18-94dd-1e27743465eb"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      SuperscriptBox["r111", "2"], "+", 
      SuperscriptBox["r121", "2"]}], ")"}], " ", "v1x"}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      SuperscriptBox["r211", "2"], "+", 
      SuperscriptBox["r221", "2"]}], ")"}], " ", "v2x"}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{
      SuperscriptBox["r311", "2"], "+", 
      SuperscriptBox["r321", "2"]}], ")"}], " ", "v3x"}], "+", 
   RowBox[{"t", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"-", 
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r111", "2"], "+", 
          SuperscriptBox["r121", "2"]}], ")"}]}], " ", "v1x"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         SuperscriptBox["s111", "2"], "+", 
         SuperscriptBox["s121", "2"]}], ")"}], " ", "v1x"}], "-", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         SuperscriptBox["r211", "2"], "+", 
         SuperscriptBox["r221", "2"]}], ")"}], " ", "v2x"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         SuperscriptBox["s211", "2"], "+", 
         SuperscriptBox["s221", "2"]}], ")"}], " ", "v2x"}], "-", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         SuperscriptBox["r311", "2"], "+", 
         SuperscriptBox["r321", "2"]}], ")"}], " ", "v3x"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         SuperscriptBox["s311", "2"], "+", 
         SuperscriptBox["s321", "2"]}], ")"}], " ", "v3x"}]}], ")"}]}], "+", 
   RowBox[{
    RowBox[{"(", 
     RowBox[{"1", "-", 
      SuperscriptBox["r111", "2"], "-", 
      SuperscriptBox["r121", "2"], "-", 
      SuperscriptBox["r211", "2"], "-", 
      SuperscriptBox["r221", "2"], "-", 
      SuperscriptBox["r311", "2"], "-", 
      SuperscriptBox["r321", "2"], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         SuperscriptBox["r111", "2"], "+", 
         SuperscriptBox["r121", "2"], "+", 
         SuperscriptBox["r211", "2"], "+", 
         SuperscriptBox["r221", "2"], "+", 
         SuperscriptBox["r311", "2"], "+", 
         SuperscriptBox["r321", "2"], "-", 
         SuperscriptBox["s111", "2"], "-", 
         SuperscriptBox["s121", "2"], "-", 
         SuperscriptBox["s211", "2"], "-", 
         SuperscriptBox["s221", "2"], "-", 
         SuperscriptBox["s311", "2"], "-", 
         SuperscriptBox["s321", "2"]}], ")"}], " ", "t"}]}], ")"}], " ", 
    "v4x"}], "+", 
   RowBox[{"t", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"r111", " ", "r112"}], "+", 
         RowBox[{"r121", " ", "r122"}]}], ")"}], " ", "v1x"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"r211", " ", "r212"}], "+", 
         RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"r311", " ", "r312"}], "+", 
         RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
      RowBox[{"t", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"-", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r111", " ", "r112"}], "+", 
             RowBox[{"r121", " ", "r122"}]}], ")"}]}], " ", "v1x"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"s111", " ", "s112"}], "+", 
            RowBox[{"s121", " ", "s122"}]}], ")"}], " ", "v1x"}], "-", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"r211", " ", "r212"}], "+", 
            RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"s211", " ", "s212"}], "+", 
            RowBox[{"s221", " ", "s222"}]}], ")"}], " ", "v2x"}], "-", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"r311", " ", "r312"}], "+", 
            RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"s311", " ", "s312"}], "+", 
            RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "v3x"}]}], ")"}]}], 
      "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"-", "r111"}], " ", "r112"}], "-", 
         RowBox[{"r121", " ", "r122"}], "-", 
         RowBox[{"r211", " ", "r212"}], "-", 
         RowBox[{"r221", " ", "r222"}], "-", 
         RowBox[{"r311", " ", "r312"}], "-", 
         RowBox[{"r321", " ", "r322"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"r111", " ", "r112"}], "+", 
            RowBox[{"r121", " ", "r122"}], "+", 
            RowBox[{"r211", " ", "r212"}], "+", 
            RowBox[{"r221", " ", "r222"}], "+", 
            RowBox[{"r311", " ", "r312"}], "+", 
            RowBox[{"r321", " ", "r322"}], "-", 
            RowBox[{"s111", " ", "s112"}], "-", 
            RowBox[{"s121", " ", "s122"}], "-", 
            RowBox[{"s211", " ", "s212"}], "-", 
            RowBox[{"s221", " ", "s222"}], "-", 
            RowBox[{"s311", " ", "s312"}], "-", 
            RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "t"}]}], ")"}], " ", 
       "v4x"}]}], ")"}]}], "+", 
   RowBox[{"t", " ", 
    RowBox[{"(", 
     RowBox[{
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"r111", " ", "r112"}], "+", 
         RowBox[{"r121", " ", "r122"}]}], ")"}], " ", "v1x"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"r211", " ", "r212"}], "+", 
         RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{"r311", " ", "r312"}], "+", 
         RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
      RowBox[{"t", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"-", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r111", " ", "r112"}], "+", 
             RowBox[{"r121", " ", "r122"}]}], ")"}]}], " ", "v1x"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"s111", " ", "s112"}], "+", 
            RowBox[{"s121", " ", "s122"}]}], ")"}], " ", "v1x"}], "-", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"r211", " ", "r212"}], "+", 
            RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"s211", " ", "s212"}], "+", 
            RowBox[{"s221", " ", "s222"}]}], ")"}], " ", "v2x"}], "-", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"r311", " ", "r312"}], "+", 
            RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"s311", " ", "s312"}], "+", 
            RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "v3x"}]}], ")"}]}], 
      "+", 
      RowBox[{
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"-", "r111"}], " ", "r112"}], "-", 
         RowBox[{"r121", " ", "r122"}], "-", 
         RowBox[{"r211", " ", "r212"}], "-", 
         RowBox[{"r221", " ", "r222"}], "-", 
         RowBox[{"r311", " ", "r312"}], "-", 
         RowBox[{"r321", " ", "r322"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"r111", " ", "r112"}], "+", 
            RowBox[{"r121", " ", "r122"}], "+", 
            RowBox[{"r211", " ", "r212"}], "+", 
            RowBox[{"r221", " ", "r222"}], "+", 
            RowBox[{"r311", " ", "r312"}], "+", 
            RowBox[{"r321", " ", "r322"}], "-", 
            RowBox[{"s111", " ", "s112"}], "-", 
            RowBox[{"s121", " ", "s122"}], "-", 
            RowBox[{"s211", " ", "s212"}], "-", 
            RowBox[{"s221", " ", "s222"}], "-", 
            RowBox[{"s311", " ", "s312"}], "-", 
            RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "t"}]}], ")"}], " ", 
       "v4x"}], "+", 
      RowBox[{"t", " ", 
       RowBox[{"(", 
        RowBox[{
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["r112", "2"], "+", 
            SuperscriptBox["r122", "2"]}], ")"}], " ", "v1x"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["r212", "2"], "+", 
            SuperscriptBox["r222", "2"]}], ")"}], " ", "v2x"}], "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            SuperscriptBox["r312", "2"], "+", 
            SuperscriptBox["r322", "2"]}], ")"}], " ", "v3x"}], "+", 
         RowBox[{"t", " ", 
          RowBox[{"(", 
           RowBox[{
            RowBox[{
             RowBox[{"-", 
              RowBox[{"(", 
               RowBox[{
                SuperscriptBox["r112", "2"], "+", 
                SuperscriptBox["r122", "2"]}], ")"}]}], " ", "v1x"}], "+", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{
               SuperscriptBox["s112", "2"], "+", 
               SuperscriptBox["s122", "2"]}], ")"}], " ", "v1x"}], "-", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{
               SuperscriptBox["r212", "2"], "+", 
               SuperscriptBox["r222", "2"]}], ")"}], " ", "v2x"}], "+", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{
               SuperscriptBox["s212", "2"], "+", 
               SuperscriptBox["s222", "2"]}], ")"}], " ", "v2x"}], "-", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{
               SuperscriptBox["r312", "2"], "+", 
               SuperscriptBox["r322", "2"]}], ")"}], " ", "v3x"}], "+", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{
               SuperscriptBox["s312", "2"], "+", 
               SuperscriptBox["s322", "2"]}], ")"}], " ", "v3x"}]}], ")"}]}], 
         "+", 
         RowBox[{
          RowBox[{"(", 
           RowBox[{
            RowBox[{"-", 
             SuperscriptBox["r112", "2"]}], "-", 
            SuperscriptBox["r122", "2"], "-", 
            SuperscriptBox["r212", "2"], "-", 
            SuperscriptBox["r222", "2"], "-", 
            SuperscriptBox["r312", "2"], "-", 
            SuperscriptBox["r322", "2"], "+", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{
               SuperscriptBox["r112", "2"], "+", 
               SuperscriptBox["r122", "2"], "+", 
               SuperscriptBox["r212", "2"], "+", 
               SuperscriptBox["r222", "2"], "+", 
               SuperscriptBox["r312", "2"], "+", 
               SuperscriptBox["r322", "2"], "-", 
               SuperscriptBox["s112", "2"], "-", 
               SuperscriptBox["s122", "2"], "-", 
               SuperscriptBox["s212", "2"], "-", 
               SuperscriptBox["s222", "2"], "-", 
               SuperscriptBox["s312", "2"], "-", 
               SuperscriptBox["s322", "2"]}], ")"}], " ", "t"}]}], ")"}], " ",
           "v4x"}]}], ")"}]}]}], ")"}]}]}], "}"}]], "Output",
 CellChangeTimes->{3.79243601129778*^9},
 CellLabel->
  "Out[221]=",ExpressionUUID->"6e494cbb-d06c-46fa-a171-8ee8c6cd07c0"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["polynomial"], "Input",
 CellLabel->
  "In[181]:=",ExpressionUUID->"3cb88bd5-d153-411d-a55d-80d85c83c61e"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"{", 
   RowBox[{
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       SuperscriptBox["r111", "2"], "+", 
       SuperscriptBox["r121", "2"]}], ")"}], " ", "v1x"}], "+", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       SuperscriptBox["r211", "2"], "+", 
       SuperscriptBox["r221", "2"]}], ")"}], " ", "v2x"}], "+", 
    RowBox[{
     RowBox[{"(", 
      RowBox[{
       SuperscriptBox["r311", "2"], "+", 
       SuperscriptBox["r321", "2"]}], ")"}], " ", "v3x"}], "+", 
    RowBox[{"t", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"-", 
         RowBox[{"(", 
          RowBox[{
           SuperscriptBox["r111", "2"], "+", 
           SuperscriptBox["r121", "2"]}], ")"}]}], " ", "v1x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["s111", "2"], "+", 
          SuperscriptBox["s121", "2"]}], ")"}], " ", "v1x"}], "-", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r211", "2"], "+", 
          SuperscriptBox["r221", "2"]}], ")"}], " ", "v2x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["s211", "2"], "+", 
          SuperscriptBox["s221", "2"]}], ")"}], " ", "v2x"}], "-", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r311", "2"], "+", 
          SuperscriptBox["r321", "2"]}], ")"}], " ", "v3x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["s311", "2"], "+", 
          SuperscriptBox["s321", "2"]}], ")"}], " ", "v3x"}]}], ")"}]}], "+", 
    
    RowBox[{
     RowBox[{"(", 
      RowBox[{"1", "-", 
       SuperscriptBox["r111", "2"], "-", 
       SuperscriptBox["r121", "2"], "-", 
       SuperscriptBox["r211", "2"], "-", 
       SuperscriptBox["r221", "2"], "-", 
       SuperscriptBox["r311", "2"], "-", 
       SuperscriptBox["r321", "2"], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r111", "2"], "+", 
          SuperscriptBox["r121", "2"], "+", 
          SuperscriptBox["r211", "2"], "+", 
          SuperscriptBox["r221", "2"], "+", 
          SuperscriptBox["r311", "2"], "+", 
          SuperscriptBox["r321", "2"], "-", 
          SuperscriptBox["s111", "2"], "-", 
          SuperscriptBox["s121", "2"], "-", 
          SuperscriptBox["s211", "2"], "-", 
          SuperscriptBox["s221", "2"], "-", 
          SuperscriptBox["s311", "2"], "-", 
          SuperscriptBox["s321", "2"]}], ")"}], " ", "t"}]}], ")"}], " ", 
     "v4x"}], "+", 
    RowBox[{"t", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r111", " ", "r112"}], "+", 
          RowBox[{"r121", " ", "r122"}]}], ")"}], " ", "v1x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r211", " ", "r212"}], "+", 
          RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r311", " ", "r312"}], "+", 
          RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
       RowBox[{"t", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"r111", " ", "r112"}], "+", 
              RowBox[{"r121", " ", "r122"}]}], ")"}]}], " ", "v1x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"s111", " ", "s112"}], "+", 
             RowBox[{"s121", " ", "s122"}]}], ")"}], " ", "v1x"}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r211", " ", "r212"}], "+", 
             RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"s211", " ", "s212"}], "+", 
             RowBox[{"s221", " ", "s222"}]}], ")"}], " ", "v2x"}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r311", " ", "r312"}], "+", 
             RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"s311", " ", "s312"}], "+", 
             RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "v3x"}]}], ")"}]}], 
       "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", "r111"}], " ", "r112"}], "-", 
          RowBox[{"r121", " ", "r122"}], "-", 
          RowBox[{"r211", " ", "r212"}], "-", 
          RowBox[{"r221", " ", "r222"}], "-", 
          RowBox[{"r311", " ", "r312"}], "-", 
          RowBox[{"r321", " ", "r322"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r111", " ", "r112"}], "+", 
             RowBox[{"r121", " ", "r122"}], "+", 
             RowBox[{"r211", " ", "r212"}], "+", 
             RowBox[{"r221", " ", "r222"}], "+", 
             RowBox[{"r311", " ", "r312"}], "+", 
             RowBox[{"r321", " ", "r322"}], "-", 
             RowBox[{"s111", " ", "s112"}], "-", 
             RowBox[{"s121", " ", "s122"}], "-", 
             RowBox[{"s211", " ", "s212"}], "-", 
             RowBox[{"s221", " ", "s222"}], "-", 
             RowBox[{"s311", " ", "s312"}], "-", 
             RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "t"}]}], ")"}], " ",
         "v4x"}]}], ")"}]}], "+", 
    RowBox[{"t", " ", 
     RowBox[{"(", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r111", " ", "r112"}], "+", 
          RowBox[{"r121", " ", "r122"}]}], ")"}], " ", "v1x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r211", " ", "r212"}], "+", 
          RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r311", " ", "r312"}], "+", 
          RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
       RowBox[{"t", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{"r111", " ", "r112"}], "+", 
              RowBox[{"r121", " ", "r122"}]}], ")"}]}], " ", "v1x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"s111", " ", "s112"}], "+", 
             RowBox[{"s121", " ", "s122"}]}], ")"}], " ", "v1x"}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r211", " ", "r212"}], "+", 
             RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "v2x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"s211", " ", "s212"}], "+", 
             RowBox[{"s221", " ", "s222"}]}], ")"}], " ", "v2x"}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r311", " ", "r312"}], "+", 
             RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "v3x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"s311", " ", "s312"}], "+", 
             RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "v3x"}]}], ")"}]}], 
       "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", "r111"}], " ", "r112"}], "-", 
          RowBox[{"r121", " ", "r122"}], "-", 
          RowBox[{"r211", " ", "r212"}], "-", 
          RowBox[{"r221", " ", "r222"}], "-", 
          RowBox[{"r311", " ", "r312"}], "-", 
          RowBox[{"r321", " ", "r322"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r111", " ", "r112"}], "+", 
             RowBox[{"r121", " ", "r122"}], "+", 
             RowBox[{"r211", " ", "r212"}], "+", 
             RowBox[{"r221", " ", "r222"}], "+", 
             RowBox[{"r311", " ", "r312"}], "+", 
             RowBox[{"r321", " ", "r322"}], "-", 
             RowBox[{"s111", " ", "s112"}], "-", 
             RowBox[{"s121", " ", "s122"}], "-", 
             RowBox[{"s211", " ", "s212"}], "-", 
             RowBox[{"s221", " ", "s222"}], "-", 
             RowBox[{"s311", " ", "s312"}], "-", 
             RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "t"}]}], ")"}], " ",
         "v4x"}], "+", 
       RowBox[{"t", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             SuperscriptBox["r112", "2"], "+", 
             SuperscriptBox["r122", "2"]}], ")"}], " ", "v1x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             SuperscriptBox["r212", "2"], "+", 
             SuperscriptBox["r222", "2"]}], ")"}], " ", "v2x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             SuperscriptBox["r312", "2"], "+", 
             SuperscriptBox["r322", "2"]}], ")"}], " ", "v3x"}], "+", 
          RowBox[{"t", " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{
              RowBox[{"-", 
               RowBox[{"(", 
                RowBox[{
                 SuperscriptBox["r112", "2"], "+", 
                 SuperscriptBox["r122", "2"]}], ")"}]}], " ", "v1x"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                SuperscriptBox["s112", "2"], "+", 
                SuperscriptBox["s122", "2"]}], ")"}], " ", "v1x"}], "-", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                SuperscriptBox["r212", "2"], "+", 
                SuperscriptBox["r222", "2"]}], ")"}], " ", "v2x"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                SuperscriptBox["s212", "2"], "+", 
                SuperscriptBox["s222", "2"]}], ")"}], " ", "v2x"}], "-", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                SuperscriptBox["r312", "2"], "+", 
                SuperscriptBox["r322", "2"]}], ")"}], " ", "v3x"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                SuperscriptBox["s312", "2"], "+", 
                SuperscriptBox["s322", "2"]}], ")"}], " ", "v3x"}]}], ")"}]}],
           "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"-", 
              SuperscriptBox["r112", "2"]}], "-", 
             SuperscriptBox["r122", "2"], "-", 
             SuperscriptBox["r212", "2"], "-", 
             SuperscriptBox["r222", "2"], "-", 
             SuperscriptBox["r312", "2"], "-", 
             SuperscriptBox["r322", "2"], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                SuperscriptBox["r112", "2"], "+", 
                SuperscriptBox["r122", "2"], "+", 
                SuperscriptBox["r212", "2"], "+", 
                SuperscriptBox["r222", "2"], "+", 
                SuperscriptBox["r312", "2"], "+", 
                SuperscriptBox["r322", "2"], "-", 
                SuperscriptBox["s112", "2"], "-", 
                SuperscriptBox["s122", "2"], "-", 
                SuperscriptBox["s212", "2"], "-", 
                SuperscriptBox["s222", "2"], "-", 
                SuperscriptBox["s312", "2"], "-", 
                SuperscriptBox["s322", "2"]}], ")"}], " ", "t"}]}], ")"}], 
           " ", "v4x"}]}], ")"}]}]}], ")"}]}]}], "}"}], "}"}]], "Output",
 CellChangeTimes->{3.792435930958682*^9},
 CellLabel->
  "Out[181]=",ExpressionUUID->"8ece111e-1671-4b0b-8022-ad3d3d476c07"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"polynomial", "=", 
  RowBox[{"polynomial", "[", 
   RowBox[{"[", "1", "]"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.79243595475986*^9, 3.792435992531741*^9}},
 CellLabel->
  "In[196]:=",ExpressionUUID->"0609179e-ebea-43cc-bcc9-7856a7ca1904"],

Cell[BoxData[
 TemplateBox[{
  "Part", "partd", 
   "\"Part specification \\!\\(\\*RowBox[{\\\"List\\\", \\\"\
\[LeftDoubleBracket]\\\", \\\"1\\\", \\\"\[RightDoubleBracket]\\\"}]\\) is \
longer than depth of object.\"", 2, 196, 28, 22751427562488358306, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{3.792435955292807*^9, 3.792435993207946*^9},
 CellLabel->
  "During evaluation of \
In[196]:=",ExpressionUUID->"4f3f48b9-9ae2-4687-8230-1fc788b488bd"],

Cell[BoxData[
 RowBox[{"List", "\[LeftDoubleBracket]", "1", 
  "\[RightDoubleBracket]"}]], "Output",
 CellChangeTimes->{{3.792435952561226*^9, 3.792435955324943*^9}, 
   3.792435993216671*^9},
 CellLabel->
  "Out[196]=",ExpressionUUID->"80b4c6f5-0571-4a89-99dc-1875b990dbd3"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData["ax"], "Input",
 CellLabel->
  "In[169]:=",ExpressionUUID->"b5028d97-3553-4f2d-ac23-722718dd91c5"],

Cell[BoxData["ax"], "Output",
 CellChangeTimes->{3.792435916743598*^9},
 CellLabel->
  "Out[169]=",ExpressionUUID->"5420832b-680c-4823-903f-0e5df8e8a235"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Coefficient", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"x", "^", "3"}], "+", 
    RowBox[{"5", "*", 
     RowBox[{"x", "^", "2"}]}], "+", 
    RowBox[{"7", "*", "x"}]}], ",", "x", ",", "2"}], "]"}]], "Input",
 CellChangeTimes->{{3.7924358595571527`*^9, 3.792435879467577*^9}},
 CellLabel->
  "In[157]:=",ExpressionUUID->"63636b38-244a-48c7-bbea-6d8b85960cee"],

Cell[BoxData["5"], "Output",
 CellChangeTimes->{{3.792435859993729*^9, 3.7924358797433863`*^9}},
 CellLabel->
  "Out[157]=",ExpressionUUID->"23c8ee17-fb99-464d-8da1-0280d8d4bbe3"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"polynomial", "//", "MatrixForm"}], "//", "FullSimplify"}]], "Input",\

 CellChangeTimes->{{3.7924357317466593`*^9, 3.7924357454534807`*^9}},
 CellLabel->
  "In[154]:=",ExpressionUUID->"962b8169-c06e-4544-bea4-40a3fd186c9b"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r111", "2"], "+", 
          SuperscriptBox["r121", "2"]}], ")"}], " ", "v1x"}], "-", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r111", "2"], "+", 
          SuperscriptBox["r121", "2"]}], ")"}], " ", "t", " ", "v1x"}], "+", 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r111", " ", "r112"}], "+", 
          RowBox[{"r121", " ", "r122"}]}], ")"}], " ", "t", " ", "v1x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["s111", "2"], "+", 
          SuperscriptBox["s121", "2"]}], ")"}], " ", "t", " ", "v1x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r211", "2"], "+", 
          SuperscriptBox["r221", "2"]}], ")"}], " ", "v2x"}], "-", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r211", "2"], "+", 
          SuperscriptBox["r221", "2"]}], ")"}], " ", "t", " ", "v2x"}], "+", 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r211", " ", "r212"}], "+", 
          RowBox[{"r221", " ", "r222"}]}], ")"}], " ", "t", " ", "v2x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["s211", "2"], "+", 
          SuperscriptBox["s221", "2"]}], ")"}], " ", "t", " ", "v2x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r311", "2"], "+", 
          SuperscriptBox["r321", "2"]}], ")"}], " ", "v3x"}], "-", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r311", "2"], "+", 
          SuperscriptBox["r321", "2"]}], ")"}], " ", "t", " ", "v3x"}], "+", 
       RowBox[{"2", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{"r311", " ", "r312"}], "+", 
          RowBox[{"r321", " ", "r322"}]}], ")"}], " ", "t", " ", "v3x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["s311", "2"], "+", 
          SuperscriptBox["s321", "2"]}], ")"}], " ", "t", " ", "v3x"}], "+", 
       RowBox[{"2", " ", 
        SuperscriptBox["t", "2"], " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{
              RowBox[{"-", "r111"}], " ", "r112"}], "-", 
             RowBox[{"r121", " ", "r122"}], "+", 
             RowBox[{"s111", " ", "s112"}], "+", 
             RowBox[{"s121", " ", "s122"}]}], ")"}], " ", "v1x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{
              RowBox[{"-", "r211"}], " ", "r212"}], "-", 
             RowBox[{"r221", " ", "r222"}], "+", 
             RowBox[{"s211", " ", "s212"}], "+", 
             RowBox[{"s221", " ", "s222"}]}], ")"}], " ", "v2x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{
              RowBox[{"-", "r311"}], " ", "r312"}], "-", 
             RowBox[{"r321", " ", "r322"}], "+", 
             RowBox[{"s311", " ", "s312"}], "+", 
             RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "v3x"}]}], ")"}]}], 
       "+", "v4x", "-", 
       RowBox[{
        SuperscriptBox["r111", "2"], " ", "v4x"}], "-", 
       RowBox[{
        SuperscriptBox["r121", "2"], " ", "v4x"}], "-", 
       RowBox[{
        SuperscriptBox["r211", "2"], " ", "v4x"}], "-", 
       RowBox[{
        SuperscriptBox["r221", "2"], " ", "v4x"}], "-", 
       RowBox[{
        SuperscriptBox["r311", "2"], " ", "v4x"}], "-", 
       RowBox[{
        SuperscriptBox["r321", "2"], " ", "v4x"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          SuperscriptBox["r111", "2"], "+", 
          SuperscriptBox["r121", "2"], "+", 
          SuperscriptBox["r211", "2"], "+", 
          SuperscriptBox["r221", "2"], "+", 
          SuperscriptBox["r311", "2"], "+", 
          SuperscriptBox["r321", "2"], "-", 
          SuperscriptBox["s111", "2"], "-", 
          SuperscriptBox["s121", "2"], "-", 
          SuperscriptBox["s211", "2"], "-", 
          SuperscriptBox["s221", "2"], "-", 
          SuperscriptBox["s311", "2"], "-", 
          SuperscriptBox["s321", "2"]}], ")"}], " ", "t", " ", "v4x"}], "+", 
       RowBox[{"2", " ", "t", " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"-", "r211"}], " ", "r212"}], "-", 
          RowBox[{"r221", " ", "r222"}], "-", 
          RowBox[{"r311", " ", "r312"}], "-", 
          RowBox[{"r321", " ", "r322"}], "+", 
          RowBox[{"r111", " ", "r112", " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"-", "1"}], "+", "t"}], ")"}]}], "+", 
          RowBox[{"r121", " ", "r122", " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"-", "1"}], "+", "t"}], ")"}]}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"r211", " ", "r212"}], "+", 
             RowBox[{"r221", " ", "r222"}], "+", 
             RowBox[{"r311", " ", "r312"}], "+", 
             RowBox[{"r321", " ", "r322"}], "-", 
             RowBox[{"s111", " ", "s112"}], "-", 
             RowBox[{"s121", " ", "s122"}], "-", 
             RowBox[{"s211", " ", "s212"}], "-", 
             RowBox[{"s221", " ", "s222"}], "-", 
             RowBox[{"s311", " ", "s312"}], "-", 
             RowBox[{"s321", " ", "s322"}]}], ")"}], " ", "t"}]}], ")"}], " ",
         "v4x"}], "+", 
       RowBox[{
        SuperscriptBox["t", "2"], " ", 
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             SuperscriptBox["r212", "2"], "+", 
             SuperscriptBox["r222", "2"]}], ")"}], " ", "v2x"}], "+", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             SuperscriptBox["r312", "2"], "+", 
             SuperscriptBox["r322", "2"]}], ")"}], " ", "v3x"}], "+", 
          RowBox[{"t", " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                SuperscriptBox["s112", "2"], "+", 
                SuperscriptBox["s122", "2"]}], ")"}], " ", "v1x"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                RowBox[{"-", 
                 SuperscriptBox["r212", "2"]}], "-", 
                SuperscriptBox["r222", "2"], "+", 
                SuperscriptBox["s212", "2"], "+", 
                SuperscriptBox["s222", "2"]}], ")"}], " ", "v2x"}], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                RowBox[{"-", 
                 SuperscriptBox["r312", "2"]}], "-", 
                SuperscriptBox["r322", "2"], "+", 
                SuperscriptBox["s312", "2"], "+", 
                SuperscriptBox["s322", "2"]}], ")"}], " ", "v3x"}]}], ")"}]}],
           "-", 
          RowBox[{
           SuperscriptBox["r112", "2"], " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"-", "1"}], "+", "t"}], ")"}], " ", 
           RowBox[{"(", 
            RowBox[{"v1x", "-", "v4x"}], ")"}]}], "-", 
          RowBox[{
           SuperscriptBox["r122", "2"], " ", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"-", "1"}], "+", "t"}], ")"}], " ", 
           RowBox[{"(", 
            RowBox[{"v1x", "-", "v4x"}], ")"}]}], "-", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             SuperscriptBox["r212", "2"], "+", 
             SuperscriptBox["r222", "2"], "+", 
             SuperscriptBox["r312", "2"], "+", 
             SuperscriptBox["r322", "2"], "+", 
             RowBox[{
              RowBox[{"(", 
               RowBox[{
                RowBox[{"-", 
                 SuperscriptBox["r212", "2"]}], "-", 
                SuperscriptBox["r222", "2"], "-", 
                SuperscriptBox["r312", "2"], "-", 
                SuperscriptBox["r322", "2"], "+", 
                SuperscriptBox["s112", "2"], "+", 
                SuperscriptBox["s122", "2"], "+", 
                SuperscriptBox["s212", "2"], "+", 
                SuperscriptBox["s222", "2"], "+", 
                SuperscriptBox["s312", "2"], "+", 
                SuperscriptBox["s322", "2"]}], ")"}], " ", "t"}]}], ")"}], 
           " ", "v4x"}]}], ")"}]}]}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.7924357338990088`*^9, 3.7924357580510197`*^9}},
 CellLabel->
  "Out[154]//MatrixForm=",ExpressionUUID->"d53792a7-92bc-4212-bdc3-\
64b1b3c0ca66"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"S4TS4", "//", "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.792435692870411*^9, 3.792435694004794*^9}},
 CellLabel->
  "In[128]:=",ExpressionUUID->"f509cb28-597b-45f0-be8d-065fc7345872"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{"1", "-", 
       SuperscriptBox["s111", "2"], "-", 
       SuperscriptBox["s121", "2"], "-", 
       SuperscriptBox["s211", "2"], "-", 
       SuperscriptBox["s221", "2"], "-", 
       SuperscriptBox["s311", "2"], "-", 
       SuperscriptBox["s321", "2"]}], 
      RowBox[{
       RowBox[{
        RowBox[{"-", "s111"}], " ", "s112"}], "-", 
       RowBox[{"s121", " ", "s122"}], "-", 
       RowBox[{"s211", " ", "s212"}], "-", 
       RowBox[{"s221", " ", "s222"}], "-", 
       RowBox[{"s311", " ", "s312"}], "-", 
       RowBox[{"s321", " ", "s322"}]}]},
     {
      RowBox[{
       RowBox[{
        RowBox[{"-", "s111"}], " ", "s112"}], "-", 
       RowBox[{"s121", " ", "s122"}], "-", 
       RowBox[{"s211", " ", "s212"}], "-", 
       RowBox[{"s221", " ", "s222"}], "-", 
       RowBox[{"s311", " ", "s312"}], "-", 
       RowBox[{"s321", " ", "s322"}]}], 
      RowBox[{
       RowBox[{"-", 
        SuperscriptBox["s112", "2"]}], "-", 
       SuperscriptBox["s122", "2"], "-", 
       SuperscriptBox["s212", "2"], "-", 
       SuperscriptBox["s222", "2"], "-", 
       SuperscriptBox["s312", "2"], "-", 
       SuperscriptBox["s322", "2"]}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.792435318214007*^9, 3.792435344421031*^9}, {
  3.792435676143436*^9, 3.792435694707815*^9}},
 CellLabel->
  "Out[128]//MatrixForm=",ExpressionUUID->"928f2f5e-c7c8-47cd-ba11-\
96b5097d690a"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Transpose", "[", "R1", "]"}], ".", "R1"}], "//", 
  "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.7924351936973763`*^9, 3.792435219172348*^9}},
 CellLabel->"In[55]:=",ExpressionUUID->"c18c4fc8-3217-46f1-8210-cd92577386cf"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       SuperscriptBox["r111", "2"], "+", 
       SuperscriptBox["r121", "2"]}], 
      RowBox[{
       RowBox[{"r111", " ", "r112"}], "+", 
       RowBox[{"r121", " ", "r122"}]}]},
     {
      RowBox[{
       RowBox[{"r111", " ", "r112"}], "+", 
       RowBox[{"r121", " ", "r122"}]}], 
      RowBox[{
       SuperscriptBox["r112", "2"], "+", 
       SuperscriptBox["r122", "2"]}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.792435195152657*^9, 3.792435219616151*^9}},
 CellLabel->
  "Out[55]//MatrixForm=",ExpressionUUID->"bed1a98c-19a1-42a1-810d-\
d99df04d3c28"]
}, Open  ]],

Cell[BoxData[""], "Input",
 CellChangeTimes->{{3.792345408288003*^9, 3.7923454153608923`*^9}, {
  3.792345446608897*^9, 3.7923457215252867`*^9}, {3.7923457593421926`*^9, 
  3.792345796845405*^9}, {3.7923459810688963`*^9, 3.792346018699731*^9}, {
  3.79234628477134*^9, 
  3.792346315053383*^9}},ExpressionUUID->"5bafe042-ec7c-493e-9b3d-\
7a76b82f5804"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"cost", "=", 
  RowBox[{
   RowBox[{"Det", "[", 
    RowBox[{"(", GridBox[{
       {"x1", "x2", "x3", "x4"},
       {"y1", "y2", "y3", "y4"},
       {"z1", "z2", "z3", "z4"},
       {"1", "1", "1", "1"}
      }], ")"}], "]"}], "//", "FullSimplify"}]}]], "Input",
 CellChangeTimes->{{3.792358023706469*^9, 3.792358030341516*^9}},
 CellLabel->"In[2]:=",ExpressionUUID->"15b1d369-ef04-46e8-b21d-f68f53dccd40"],

Cell[BoxData[
 RowBox[{
  RowBox[{"x2", " ", "y3", " ", "z1"}], "-", 
  RowBox[{"x2", " ", "y4", " ", "z1"}], "-", 
  RowBox[{"x1", " ", "y3", " ", "z2"}], "+", 
  RowBox[{"x1", " ", "y4", " ", "z2"}], "-", 
  RowBox[{"x2", " ", "y1", " ", "z3"}], "+", 
  RowBox[{"x1", " ", "y2", " ", "z3"}], "-", 
  RowBox[{"x1", " ", "y4", " ", "z3"}], "+", 
  RowBox[{"x2", " ", "y4", " ", "z3"}], "+", 
  RowBox[{"x4", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"y2", " ", "z1"}], "-", 
     RowBox[{"y3", " ", "z1"}], "-", 
     RowBox[{"y1", " ", "z2"}], "+", 
     RowBox[{"y3", " ", "z2"}], "+", 
     RowBox[{"y1", " ", "z3"}], "-", 
     RowBox[{"y2", " ", "z3"}]}], ")"}]}], "+", 
  RowBox[{"x2", " ", "y1", " ", "z4"}], "-", 
  RowBox[{"x1", " ", "y2", " ", "z4"}], "+", 
  RowBox[{"x1", " ", "y3", " ", "z4"}], "-", 
  RowBox[{"x2", " ", "y3", " ", "z4"}], "+", 
  RowBox[{"x3", " ", 
   RowBox[{"(", 
    RowBox[{
     RowBox[{"y4", " ", "z1"}], "+", 
     RowBox[{"y1", " ", "z2"}], "-", 
     RowBox[{"y4", " ", "z2"}], "-", 
     RowBox[{"y1", " ", "z4"}], "+", 
     RowBox[{"y2", " ", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{"-", "z1"}], "+", "z4"}], ")"}]}]}], ")"}]}]}]], "Output",
 CellChangeTimes->{
  3.7923454165797987`*^9, {3.7923580252374907`*^9, 3.792358030996819*^9}},
 CellLabel->"Out[2]=",ExpressionUUID->"9872eaed-b5ec-47fa-ad34-3c1538549cb5"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Minimize", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"x", "-", 
      RowBox[{"2", " ", "y"}]}], ",", " ", 
     RowBox[{
      RowBox[{
       RowBox[{"x", "^", "2"}], "+", 
       RowBox[{"y", "^", "2"}]}], "\[LessEqual]", "1"}], ",", " ", 
     RowBox[{"x", "\[GreaterEqual]", 
      RowBox[{"-", "0.3"}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{"x", ",", "y"}], "}"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.792345877854596*^9, 3.7923459737521048`*^9}},
 CellLabel->"In[9]:=",ExpressionUUID->"0a056487-b85d-4cf1-93f2-da941f58a76d"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"-", "2.2078788980984485`"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"x", "\[Rule]", 
      RowBox[{"-", "0.30000095847930364`"}]}], ",", 
     RowBox[{"y", "\[Rule]", "0.9539389698095725`"}]}], "}"}]}], 
  "}"}]], "Output",
 CellChangeTimes->{{3.792345884646831*^9, 3.792345974086204*^9}},
 CellLabel->"Out[9]=",ExpressionUUID->"2102046e-35b4-43af-b144-26275d6aea1e"]
}, Open  ]],

Cell[BoxData[\
"WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW"], "Input",
 CellChangeTimes->{{3.792345661621071*^9, 
  3.792345669606461*^9}},ExpressionUUID->"60c1c749-20f3-4fba-8a2f-\
f5f6cf5a88c5"],

Cell[BoxData[
 RowBox[{"Minimize", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"cost", ",", 
     RowBox[{
      RowBox[{"(", "\[NoBreak]", 
       TagBox[GridBox[{
          {"ax"},
          {"ay"},
          {"az"},
          {"bx"},
          {"by"},
          {"bz"},
          {GridBox[{
             {"cx"},
             {"cy"},
             {"cz"}
            },
            
            GridBoxAlignment->{
             "Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
            GridBoxSpacings->{"Columns" -> {
                Offset[0.27999999999999997`], {
                 Offset[0.5599999999999999]}, 
                Offset[0.27999999999999997`]}, "Rows" -> {
                Offset[0.2], {
                 Offset[0.4]}, 
                Offset[0.2]}}]},
          {"dx"},
          {"dy"},
          {"dz"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}],
        Column], "\[NoBreak]", ")"}], "\[Equal]", 
      RowBox[{"a", ".", 
       RowBox[{"(", GridBox[{
          {"x1"},
          {"y1"},
          {"z1"},
          {"x2"},
          {"y2"},
          {"z2"},
          {"x3"},
          {"y3"},
          {"z3"},
          {"x4"},
          {"y4"},
          {"z4"}
         }], ")"}]}]}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
    "x1", ",", "y1", ",", "z1", ",", "x2", ",", "y2", ",", "z2", ",", "x3", 
     ",", "y3", ",", "z3", ",", "x4", ",", "y4", ",", "z4", ",", "l1a", ",", 
     "l2a", ",", "l3a", ",", "l1b", ",", "l2b", ",", "l3b", ",", "l1c", ",", 
     "l2ac", ",", "l3c", ",", "l1d", ",", "l2d", ",", "l3d"}], "}"}]}], 
  "]"}]], "Input",ExpressionUUID->"881e1115-9720-46fe-90d2-80e0854c0ea8"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"a", ".", 
   RowBox[{"(", GridBox[{
      {"x1"},
      {"y1"},
      {"z1"},
      {"x2"},
      {"y2"},
      {"z2"},
      {"x3"},
      {"y3"},
      {"z3"},
      {"x4"},
      {"y4"},
      {"z4"}
     }], ")"}]}], "//", "MatrixForm"}]], "Input",
 CellChangeTimes->{
  3.79234526092447*^9, {3.7923453670361633`*^9, 3.792345368480074*^9}},
 CellLabel->
  "In[164]:=",ExpressionUUID->"92284809-2446-4e45-8db3-b5916b09c6dc"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"l1a", " ", "x1"}], "+", 
       RowBox[{"l2a", " ", "x2"}], "+", 
       RowBox[{"l3a", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
        "x4"}]}]},
     {
      RowBox[{
       RowBox[{"l1a", " ", "y1"}], "+", 
       RowBox[{"l2a", " ", "y2"}], "+", 
       RowBox[{"l3a", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
        "y4"}]}]},
     {
      RowBox[{
       RowBox[{"l1a", " ", "z1"}], "+", 
       RowBox[{"l2a", " ", "z2"}], "+", 
       RowBox[{"l3a", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
        "z4"}]}]},
     {
      RowBox[{
       RowBox[{"l1b", " ", "x1"}], "+", 
       RowBox[{"l2b", " ", "x2"}], "+", 
       RowBox[{"l3b", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
        "x4"}]}]},
     {
      RowBox[{
       RowBox[{"l1b", " ", "y1"}], "+", 
       RowBox[{"l2b", " ", "y2"}], "+", 
       RowBox[{"l3b", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
        "y4"}]}]},
     {
      RowBox[{
       RowBox[{"l1b", " ", "z1"}], "+", 
       RowBox[{"l2b", " ", "z2"}], "+", 
       RowBox[{"l3b", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
        "z4"}]}]},
     {
      RowBox[{
       RowBox[{"l1c", " ", "x1"}], "+", 
       RowBox[{"l2c", " ", "x2"}], "+", 
       RowBox[{"l3c", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
        "x4"}]}]},
     {
      RowBox[{
       RowBox[{"l1c", " ", "y1"}], "+", 
       RowBox[{"l2c", " ", "y2"}], "+", 
       RowBox[{"l3c", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
        "y4"}]}]},
     {
      RowBox[{
       RowBox[{"l1c", " ", "z1"}], "+", 
       RowBox[{"l2c", " ", "z2"}], "+", 
       RowBox[{"l3c", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
        "z4"}]}]},
     {
      RowBox[{
       RowBox[{"l1d", " ", "x1"}], "+", 
       RowBox[{"l2d", " ", "x2"}], "+", 
       RowBox[{"l3d", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
        "x4"}]}]},
     {
      RowBox[{
       RowBox[{"l1d", " ", "y1"}], "+", 
       RowBox[{"l2d", " ", "y2"}], "+", 
       RowBox[{"l3d", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
        "y4"}]}]},
     {
      RowBox[{
       RowBox[{"l1d", " ", "z1"}], "+", 
       RowBox[{"l2d", " ", "z2"}], "+", 
       RowBox[{"l3d", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
        "z4"}]}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.792345243637063*^9, 3.792345261453817*^9}, 
   3.792345368890048*^9},
 CellLabel->
  "Out[164]//MatrixForm=",ExpressionUUID->"9b6a1d26-869e-4a5c-9bc6-\
07335a32cbfa"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"a", ".", 
   RowBox[{"(", GridBox[{
      {"x1"},
      {"y1"},
      {"z1"},
      {"x2"},
      {"y2"},
      {"z2"},
      {"x3"},
      {"y3"},
      {"z3"},
      {"x4"},
      {"y4"},
      {"z4"}
     }], ")"}]}], "//", "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.792345192170848*^9, 3.792345193291306*^9}},
 CellLabel->
  "In[156]:=",ExpressionUUID->"da5f068c-5ea9-41f0-8368-95889dbe524d"],

Cell[BoxData[
 TagBox[
  RowBox[{"(", "\[NoBreak]", GridBox[{
     {
      RowBox[{
       RowBox[{"l1a", " ", "x1"}], "+", 
       RowBox[{"l2a", " ", "x2"}], "+", 
       RowBox[{"l3a", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
        "x4"}]}]},
     {
      RowBox[{
       RowBox[{"l1a", " ", "y1"}], "+", 
       RowBox[{"l2a", " ", "y2"}], "+", 
       RowBox[{"l3a", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
        "y4"}]}]},
     {
      RowBox[{
       RowBox[{"l1a", " ", "z1"}], "+", 
       RowBox[{"l2a", " ", "z2"}], "+", 
       RowBox[{"l3a", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
        "z4"}]}]},
     {
      RowBox[{
       RowBox[{"l1b", " ", "x1"}], "+", 
       RowBox[{"l2b", " ", "x2"}], "+", 
       RowBox[{"l3b", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
        "x4"}]}]},
     {
      RowBox[{
       RowBox[{"l1b", " ", "y1"}], "+", 
       RowBox[{"l2b", " ", "y2"}], "+", 
       RowBox[{"l3b", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
        "y4"}]}]},
     {
      RowBox[{
       RowBox[{"l1b", " ", "z1"}], "+", 
       RowBox[{"l2b", " ", "z2"}], "+", 
       RowBox[{"l3b", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
        "z4"}]}]},
     {
      RowBox[{
       RowBox[{"l1c", " ", "x1"}], "+", 
       RowBox[{"l2c", " ", "x2"}], "+", 
       RowBox[{"l3c", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
        "x4"}]}]},
     {
      RowBox[{
       RowBox[{"l1c", " ", "y1"}], "+", 
       RowBox[{"l2c", " ", "y2"}], "+", 
       RowBox[{"l3c", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
        "y4"}]}]},
     {
      RowBox[{
       RowBox[{"l1c", " ", "z1"}], "+", 
       RowBox[{"l2c", " ", "z2"}], "+", 
       RowBox[{"l3c", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
        "z4"}]}]},
     {
      RowBox[{
       RowBox[{"l1d", " ", "x1"}], "+", 
       RowBox[{"l2d", " ", "x2"}], "+", 
       RowBox[{"l3d", " ", "x3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
        "x4"}]}]},
     {
      RowBox[{
       RowBox[{"l1d", " ", "y1"}], "+", 
       RowBox[{"l2d", " ", "y2"}], "+", 
       RowBox[{"l3d", " ", "y3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
        "y4"}]}]},
     {
      RowBox[{
       RowBox[{"l1d", " ", "z1"}], "+", 
       RowBox[{"l2d", " ", "z2"}], "+", 
       RowBox[{"l3d", " ", "z3"}], "+", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
        "z4"}]}]}
    },
    GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
    GridBoxSpacings->{"Columns" -> {
        Offset[0.27999999999999997`], {
         Offset[0.7]}, 
        Offset[0.27999999999999997`]}, "Rows" -> {
        Offset[0.2], {
         Offset[0.4]}, 
        Offset[0.2]}}], "\[NoBreak]", ")"}],
  Function[BoxForm`e$, 
   MatrixForm[BoxForm`e$]]]], "Output",
 CellChangeTimes->{{3.792345127921439*^9, 3.792345133488387*^9}, {
  3.7923451713136253`*^9, 3.792345194136569*^9}},
 CellLabel->
  "Out[156]//MatrixForm=",ExpressionUUID->"55126a11-3c26-438a-ab9f-\
4de00935cf47"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(", "\[NoBreak]", 
   TagBox[GridBox[{
      {"ax"},
      {"ay"},
      {"az"},
      {"bx"},
      {"by"},
      {"bz"},
      {GridBox[{
         {"cx"},
         {"cy"},
         {"cz"}
        },
        GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.5599999999999999]}, 
            Offset[0.27999999999999997`]}, "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}}]},
      {"dx"},
      {"dy"},
      {"dz"}
     },
     GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}}],
    Column], "\[NoBreak]", ")"}], "\[Equal]", 
  RowBox[{"a", ".", 
   RowBox[{"(", GridBox[{
      {"x1"},
      {"y1"},
      {"z1"},
      {"x2"},
      {"y2"},
      {"z2"},
      {"x3"},
      {"y3"},
      {"z3"},
      {"x4"},
      {"y4"},
      {"z4"}
     }], ")"}]}]}]], "Input",
 CellLabel->
  "In[140]:=",ExpressionUUID->"e7221398-5eb4-4782-8d8d-cb98085d42a0"],

Cell[BoxData["False"], "Output",
 CellChangeTimes->{{3.7923451025233803`*^9, 3.79234511656528*^9}},
 CellLabel->
  "Out[140]=",ExpressionUUID->"fe393116-1722-4b7e-82a9-4bec41fef86a"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"a", ".", 
  RowBox[{"(", GridBox[{
     {"x1"},
     {"y1"},
     {"z1"},
     {"x2"},
     {"y2"},
     {"z2"},
     {"x3"},
     {"y3"},
     {"z3"},
     {"x4"},
     {"y4"},
     {"z4"}
    }], ")"}]}]], "Input",
 CellChangeTimes->{{3.792345055788423*^9, 3.792345055976781*^9}},
 CellLabel->
  "In[135]:=",ExpressionUUID->"99c7b09f-2d1b-45f2-96dc-d9da3609fdf1"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1a", " ", "x1"}], "+", 
     RowBox[{"l2a", " ", "x2"}], "+", 
     RowBox[{"l3a", " ", "x3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
      "x4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1a", " ", "y1"}], "+", 
     RowBox[{"l2a", " ", "y2"}], "+", 
     RowBox[{"l3a", " ", "y3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
      "y4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1a", " ", "z1"}], "+", 
     RowBox[{"l2a", " ", "z2"}], "+", 
     RowBox[{"l3a", " ", "z3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ")"}], " ", 
      "z4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1b", " ", "x1"}], "+", 
     RowBox[{"l2b", " ", "x2"}], "+", 
     RowBox[{"l3b", " ", "x3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
      "x4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1b", " ", "y1"}], "+", 
     RowBox[{"l2b", " ", "y2"}], "+", 
     RowBox[{"l3b", " ", "y3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
      "y4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1b", " ", "z1"}], "+", 
     RowBox[{"l2b", " ", "z2"}], "+", 
     RowBox[{"l3b", " ", "z3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ")"}], " ", 
      "z4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1c", " ", "x1"}], "+", 
     RowBox[{"l2c", " ", "x2"}], "+", 
     RowBox[{"l3c", " ", "x3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
      "x4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1c", " ", "y1"}], "+", 
     RowBox[{"l2c", " ", "y2"}], "+", 
     RowBox[{"l3c", " ", "y3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
      "y4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1c", " ", "z1"}], "+", 
     RowBox[{"l2c", " ", "z2"}], "+", 
     RowBox[{"l3c", " ", "z3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ")"}], " ", 
      "z4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1d", " ", "x1"}], "+", 
     RowBox[{"l2d", " ", "x2"}], "+", 
     RowBox[{"l3d", " ", "x3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
      "x4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1d", " ", "y1"}], "+", 
     RowBox[{"l2d", " ", "y2"}], "+", 
     RowBox[{"l3d", " ", "y3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
      "y4"}]}], "}"}], ",", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"l1d", " ", "z1"}], "+", 
     RowBox[{"l2d", " ", "z2"}], "+", 
     RowBox[{"l3d", " ", "z3"}], "+", 
     RowBox[{
      RowBox[{"(", 
       RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ")"}], " ", 
      "z4"}]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.7923450407366457`*^9, 3.792345056224811*^9}},
 CellLabel->
  "Out[135]=",ExpressionUUID->"7851cc40-62a8-43da-b8a2-0d16494a6ef1"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(", GridBox[{
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}
    }], ")"}], ".", 
  RowBox[{"(", GridBox[{
     {"x1"},
     {"y1"},
     {"z1"},
     {"x2"},
     {"y2"},
     {"z2"},
     {"x3"},
     {"y3"},
     {"z3"},
     {"x4"},
     {"y4"},
     {"4"}
    }], ")"}]}]], "Input",
 CellChangeTimes->{{3.792344830809114*^9, 3.7923450288327713`*^9}},
 CellLabel->
  "In[133]:=",ExpressionUUID->"37e73f82-c8a5-494d-a2fe-21e8e052314c"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}], ",", 
   RowBox[{"{", "0", "}"}]}], "}"}]], "Output",
 CellChangeTimes->{
  3.792344836468095*^9, 3.792344903274338*^9, {3.7923449335121813`*^9, 
   3.792344991101778*^9}, 3.792345029997138*^9},
 CellLabel->
  "Out[133]=",ExpressionUUID->"f88d98f0-3b73-4822-991c-4dcc1210c917"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{"(", GridBox[{
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"},
     {"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"}
    }], ")"}], ".", 
  RowBox[{"(", "\[NoBreak]", 
   TagBox[GridBox[{
      {"x1"},
      {"y1"},
      {"z1"},
      {"x2"},
      {"y2"},
      {"z2"},
      {GridBox[{
         {"x3"},
         {"y3"},
         {"z3"}
        },
        GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.5599999999999999]}, 
            Offset[0.27999999999999997`]}, "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}}]},
      {"x4"},
      {"y4"},
      {"z4"}
     },
     GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}}],
    Column], "\[NoBreak]", ")"}]}]], "Input",
 CellChangeTimes->{{3.792344704433663*^9, 3.792344775678344*^9}},
 CellLabel->
  "In[120]:=",ExpressionUUID->"59261354-aa49-4562-af2a-c27e2e2d8011"],

Cell[BoxData[
 TemplateBox[{
  "Dot", "rect", "\"Nonrectangular tensor encountered.\"", 2, 120, 19, 
   22750748451378006459, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{{3.792344682701028*^9, 3.792344711257584*^9}, {
  3.7923447661061563`*^9, 3.792344776109314*^9}},
 CellLabel->
  "During evaluation of \
In[120]:=",ExpressionUUID->"9e7b4205-66e5-48bb-8e76-01fe80d9aa22"],

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", "0", ",", 
      "0", ",", "0", ",", "0", ",", "0", ",", "0"}], "}"}]}], "}"}], ".", 
  RowBox[{"{", 
   RowBox[{"x1", ",", "y1", ",", "z1", ",", "x2", ",", "y2", ",", "z2", ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", "x3", "}"}], ",", 
      RowBox[{"{", "y3", "}"}], ",", 
      RowBox[{"{", "z3", "}"}]}], "}"}], ",", "x4", ",", "y4", ",", "z4"}], 
   "}"}]}]], "Output",
 CellChangeTimes->{{3.792344682713173*^9, 3.792344711268053*^9}, {
  3.792344766132655*^9, 3.7923447761167994`*^9}},
 CellLabel->
  "Out[120]=",ExpressionUUID->"17922105-c391-42f5-b5d1-23e684316499"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"a", ".", 
  RowBox[{"(", "\[NoBreak]", 
   TagBox[GridBox[{
      {"x1"},
      {"y1"},
      {"z1"},
      {"x2"},
      {"y2"},
      {"z2"},
      {GridBox[{
         {"x3"},
         {"y3"},
         {"z3"}
        },
        GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.5599999999999999]}, 
            Offset[0.27999999999999997`]}, "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}}]},
      {"x4"},
      {"y4"},
      {"z4"}
     },
     GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}}],
    Column], "\[NoBreak]", ")"}]}]], "Input",
 CellLabel->
  "In[113]:=",ExpressionUUID->"b569b52f-2f1a-4e26-b12a-7ba8516291d0"],

Cell[BoxData[
 TemplateBox[{
  "Dot", "rect", "\"Nonrectangular tensor encountered.\"", 2, 113, 12, 
   22750748451378006459, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{3.792344692512413*^9},
 CellLabel->
  "During evaluation of \
In[113]:=",ExpressionUUID->"6de4dc04-18e6-4842-bca0-7f7ce8e0fb60"],

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "l1a", ",", "0", ",", "0", ",", "l2a", ",", "0", ",", "0", ",", "l3a", 
      ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ",", "0", ",", "0"}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "l1a", ",", "0", ",", "0", ",", "l2a", ",", "0", ",", "0", ",",
       "l3a", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "l1a", ",", "0", ",", "0", ",", "l2a", ",", "0", ",",
       "0", ",", "l3a", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}]}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "l1b", ",", "0", ",", "0", ",", "l2b", ",", "0", ",", "0", ",", "l3b", 
      ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ",", "0", ",", "0"}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "l1b", ",", "0", ",", "0", ",", "l2b", ",", "0", ",", "0", ",",
       "l3b", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "l1b", ",", "0", ",", "0", ",", "l2b", ",", "0", ",",
       "0", ",", "l3b", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}]}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "l1c", ",", "0", ",", "0", ",", "l2c", ",", "0", ",", "0", ",", "l3c", 
      ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ",", "0", ",", "0"}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "l1c", ",", "0", ",", "0", ",", "l2c", ",", "0", ",", "0", ",",
       "l3c", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "l1c", ",", "0", ",", "0", ",", "l2c", ",", "0", ",",
       "0", ",", "l3c", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}]}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "l1d", ",", "0", ",", "0", ",", "l2d", ",", "0", ",", "0", ",", "l3d", 
      ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ",", "0", ",", "0"}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "l1d", ",", "0", ",", "0", ",", "l2d", ",", "0", ",", "0", ",",
       "l3d", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "l1d", ",", "0", ",", "0", ",", "l2d", ",", "0", ",",
       "0", ",", "l3d", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}]}], "}"}]}], "}"}], 
  ".", 
  RowBox[{"{", 
   RowBox[{"x1", ",", "y1", ",", "z1", ",", "x2", ",", "y2", ",", "z2", ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", "x3", "}"}], ",", 
      RowBox[{"{", "y3", "}"}], ",", 
      RowBox[{"{", "z3", "}"}]}], "}"}], ",", "x4", ",", "y4", ",", "z4"}], 
   "}"}]}]], "Output",
 CellChangeTimes->{3.792344692520194*^9},
 CellLabel->
  "Out[113]=",ExpressionUUID->"23c55b47-94b4-4861-8093-f279f4e2c240"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"a", ".", 
  RowBox[{"(", "\[NoBreak]", 
   TagBox[GridBox[{
      {"x1"},
      {"y1"},
      {"z1"},
      {"x2"},
      {"y2"},
      {"z2"},
      {GridBox[{
         {"x3"},
         {"y3"},
         {"z3"}
        },
        GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.5599999999999999]}, 
            Offset[0.27999999999999997`]}, "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}}]},
      {"x4"},
      {"y4"},
      {"z4"}
     },
     GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}}],
    Column], "\[NoBreak]", ")"}]}]], "Input",
 CellLabel->
  "In[108]:=",ExpressionUUID->"d2382b20-d790-43b1-a355-571532eeb682"],

Cell[BoxData[
 TemplateBox[{
  "Dot", "rect", "\"Nonrectangular tensor encountered.\"", 2, 108, 10, 
   22750748451378006459, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 CellChangeTimes->{{3.792344396564074*^9, 3.792344404711247*^9}, 
   3.7923445149164352`*^9, {3.792344564182419*^9, 3.792344581947785*^9}},
 CellLabel->
  "During evaluation of \
In[108]:=",ExpressionUUID->"b233e1a9-f422-4afe-aef8-653a3bf144a1"],

Cell[BoxData[
 RowBox[{
  RowBox[{"{", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "l1a", ",", "0", ",", "0", ",", "l2a", ",", "0", ",", "0", ",", "l3a", 
      ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ",", "0", ",", "0"}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "l1a", ",", "0", ",", "0", ",", "l2a", ",", "0", ",", "0", ",",
       "l3a", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}], ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "l1a", ",", "0", ",", "0", ",", "l2a", ",", "0", ",",
       "0", ",", "l3a", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1a", "-", "l2a", "-", "l3a"}]}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "l1b", ",", "0", ",", "0", ",", "l2b", ",", "0", ",", "0", ",", "l3b", 
      ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ",", "0", ",", "0"}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "l1b", ",", "0", ",", "0", ",", "l2b", ",", "0", ",", "0", ",",
       "l3b", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}], ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "l1b", ",", "0", ",", "0", ",", "l2b", ",", "0", ",",
       "0", ",", "l3b", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1b", "-", "l2b", "-", "l3b"}]}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "l1c", ",", "0", ",", "0", ",", "l2c", ",", "0", ",", "0", ",", "l3c", 
      ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ",", "0", ",", "0"}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "l1c", ",", "0", ",", "0", ",", "l2c", ",", "0", ",", "0", ",",
       "l3c", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}], ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "l1c", ",", "0", ",", "0", ",", "l2c", ",", "0", ",",
       "0", ",", "l3c", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1c", "-", "l2c", "-", "l3c"}]}], "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "l1d", ",", "0", ",", "0", ",", "l2d", ",", "0", ",", "0", ",", "l3d", 
      ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ",", "0", ",", "0"}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "l1d", ",", "0", ",", "0", ",", "l2d", ",", "0", ",", "0", ",",
       "l3d", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}], ",", "0"}], "}"}], 
    ",", 
    RowBox[{"{", 
     RowBox[{
     "0", ",", "0", ",", "l1d", ",", "0", ",", "0", ",", "l2d", ",", "0", ",",
       "0", ",", "l3d", ",", "0", ",", "0", ",", 
      RowBox[{"1", "-", "l1d", "-", "l2d", "-", "l3d"}]}], "}"}]}], "}"}], 
  ".", 
  RowBox[{"{", 
   RowBox[{"x1", ",", "y1", ",", "z1", ",", "x2", ",", "y2", ",", "z2", ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", "x3", "}"}], ",", 
      RowBox[{"{", "y3", "}"}], ",", 
      RowBox[{"{", "z3", "}"}]}], "}"}], ",", "x4", ",", "y4", ",", "z4"}], 
   "}"}]}]], "Output",
 CellChangeTimes->{{3.7923443965714293`*^9, 3.792344404720051*^9}, 
   3.792344514924561*^9, {3.792344564190646*^9, 3.792344581958046*^9}},
 CellLabel->
  "Out[108]=",ExpressionUUID->"cdd93294-a70b-485a-af80-e64289856e9a"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"Inverse", "[", "A", "]"}], ".", 
   RowBox[{"(", "\[NoBreak]", 
    TagBox[GridBox[{
       {"x1"},
       {"y1"},
       {"z1"},
       {"x2"},
       {"y2"},
       {"z2"},
       {GridBox[{
          {"x3"},
          {"y3"},
          {"z3"}
         },
         GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
         GridBoxSpacings->{"Columns" -> {
             Offset[0.27999999999999997`], {
              Offset[0.5599999999999999]}, 
             Offset[0.27999999999999997`]}, "Rows" -> {
             Offset[0.2], {
              Offset[0.4]}, 
             Offset[0.2]}}]},
       {"x4"},
       {"y4"},
       {"z4"}
      },
      GridBoxAlignment->{"Columns" -> {{Center}}, "Rows" -> {{Baseline}}},
      GridBoxSpacings->{"Columns" -> {
          Offset[0.27999999999999997`], {
           Offset[0.5599999999999999]}, 
          Offset[0.27999999999999997`]}, "Rows" -> {
          Offset[0.2], {
           Offset[0.4]}, 
          Offset[0.2]}}],
     Column], "\[NoBreak]", ")"}]}], "//", "MatrixForm"}]], "Input",
 CellChangeTimes->{{3.792343710907057*^9, 3.7923437250718927`*^9}, {
   3.792343845441725*^9, 3.792343946045659*^9}, 3.7923439944986258`*^9},
 CellLabel->"In[73]:=",ExpressionUUID->"8541213f-c00a-4595-8250-d4bce1ce1d5f"],

Cell[BoxData[
 TemplateBox[{
  "Dot", "rect", "\"Nonrectangular tensor encountered.\"", 2, 73, 3, 
   22750748451378006459, "Local"},
  "MessageTemplate"]], "Message", "MSG",
 GeneratedCell->False,
 CellAutoOverwrite->False,
 CellChangeTimes->{{3.792343968094652*^9, 3.792343995168714*^9}, {
  3.792344255065043*^9, 
  3.792344255700706*^9}},ExpressionUUID->"dd3c1e7a-b178-458f-9c53-\
1c8d02196f48"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Minimize", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"b", "*", "c", "*", " ", 
     RowBox[{"x", "^", "2"}]}], "-", 
    RowBox[{"a", "*", " ", "x"}], "+", "5"}], ",", "x"}], "]"}]], "Input",
 CellChangeTimes->{{3.792344209450719*^9, 3.7923442410536337`*^9}},
 CellLabel->"In[78]:=",ExpressionUUID->"f6ba9323-fe0d-43ca-8999-497f45e0e33a"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   TagBox[GridBox[{
      {"\[Piecewise]", GridBox[{
         {"5", 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", "\[Equal]", "0"}], "&&", 
             RowBox[{"a", "\[Equal]", "0"}]}], ")"}], "||", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", ">", "0"}], "&&", 
             RowBox[{"a", "\[Equal]", "0"}], "&&", 
             RowBox[{"b", "\[Equal]", "0"}]}], ")"}], "||", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", ">", "0"}], "&&", 
             RowBox[{"a", "\[Equal]", "0"}], "&&", 
             RowBox[{"b", ">", "0"}]}], ")"}], "||", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", "<", "0"}], "&&", 
             RowBox[{"a", "\[Equal]", "0"}], "&&", 
             RowBox[{"b", "\[Equal]", "0"}]}], ")"}], "||", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", "<", "0"}], "&&", 
             RowBox[{"a", "\[Equal]", "0"}], "&&", 
             RowBox[{"b", "<", "0"}]}], ")"}]}]},
         {
          FractionBox[
           RowBox[{
            RowBox[{"-", 
             SuperscriptBox["a", "2"]}], "+", 
            RowBox[{"20", " ", "b", " ", "c"}]}], 
           RowBox[{"4", " ", "b", " ", "c"}]], 
          RowBox[{
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", ">", "0"}], "&&", 
             RowBox[{"a", ">", "0"}], "&&", 
             RowBox[{"b", ">", "0"}]}], ")"}], "||", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", ">", "0"}], "&&", 
             RowBox[{"a", "<", "0"}], "&&", 
             RowBox[{"b", ">", "0"}]}], ")"}], "||", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", "<", "0"}], "&&", 
             RowBox[{"a", ">", "0"}], "&&", 
             RowBox[{"b", "<", "0"}]}], ")"}], "||", 
           RowBox[{"(", 
            RowBox[{
             RowBox[{"c", "<", "0"}], "&&", 
             RowBox[{"a", "<", "0"}], "&&", 
             RowBox[{"b", "<", "0"}]}], ")"}]}]},
         {
          RowBox[{"-", "\[Infinity]"}], 
          TagBox["True",
           "PiecewiseDefault",
           AutoDelete->True]}
        },
        AllowedDimensions->{2, Automatic},
        Editable->True,
        GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}},
        GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}},
        GridBoxSpacings->{"Columns" -> {
            Offset[0.27999999999999997`], {
             Offset[0.84]}, 
            Offset[0.27999999999999997`]}, "Rows" -> {
            Offset[0.2], {
             Offset[0.4]}, 
            Offset[0.2]}},
        Selectable->True]}
     },
     GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}},
     GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.35]}, 
         Offset[0.27999999999999997`]}, "Rows" -> {
         Offset[0.2], {
          Offset[0.4]}, 
         Offset[0.2]}}],
    "Piecewise",
    DeleteWithContents->True,
    Editable->False,
    SelectWithContents->True,
    Selectable->False,
    StripWrapperBoxes->True], ",", 
   RowBox[{"{", 
    RowBox[{"x", "\[Rule]", 
     TagBox[GridBox[{
        {"\[Piecewise]", GridBox[{
           {
            FractionBox["a", 
             RowBox[{"2", " ", "b", " ", "c"}]], 
            RowBox[{
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", ">", "0"}], "&&", 
               RowBox[{"a", ">", "0"}], "&&", 
               RowBox[{"b", ">", "0"}]}], ")"}], "||", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", ">", "0"}], "&&", 
               RowBox[{"a", "<", "0"}], "&&", 
               RowBox[{"b", ">", "0"}]}], ")"}], "||", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", "<", "0"}], "&&", 
               RowBox[{"a", ">", "0"}], "&&", 
               RowBox[{"b", "<", "0"}]}], ")"}], "||", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", "<", "0"}], "&&", 
               RowBox[{"a", "<", "0"}], "&&", 
               RowBox[{"b", "<", "0"}]}], ")"}]}]},
           {"0", 
            RowBox[{
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", "\[Equal]", "0"}], "&&", 
               RowBox[{"a", "\[Equal]", "0"}]}], ")"}], "||", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", ">", "0"}], "&&", 
               RowBox[{"a", "\[Equal]", "0"}], "&&", 
               RowBox[{"b", "\[Equal]", "0"}]}], ")"}], "||", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", ">", "0"}], "&&", 
               RowBox[{"a", "\[Equal]", "0"}], "&&", 
               RowBox[{"b", ">", "0"}]}], ")"}], "||", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", "<", "0"}], "&&", 
               RowBox[{"a", "\[Equal]", "0"}], "&&", 
               RowBox[{"b", "\[Equal]", "0"}]}], ")"}], "||", 
             RowBox[{"(", 
              RowBox[{
               RowBox[{"c", "<", "0"}], "&&", 
               RowBox[{"a", "\[Equal]", "0"}], "&&", 
               RowBox[{"b", "<", "0"}]}], ")"}]}]},
           {"Indeterminate", 
            TagBox["True",
             "PiecewiseDefault",
             AutoDelete->True]}
          },
          AllowedDimensions->{2, Automatic},
          Editable->True,
          GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}},
          GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}},
          GridBoxSpacings->{"Columns" -> {
              Offset[0.27999999999999997`], {
               Offset[0.84]}, 
              Offset[0.27999999999999997`]}, "Rows" -> {
              Offset[0.2], {
               Offset[0.4]}, 
              Offset[0.2]}},
          Selectable->True]}
       },
       GridBoxAlignment->{"Columns" -> {{Left}}, "Rows" -> {{Baseline}}},
       GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{1.}}},
       GridBoxSpacings->{"Columns" -> {
           Offset[0.27999999999999997`], {
            Offset[0.35]}, 
           Offset[0.27999999999999997`]}, "Rows" -> {
           Offset[0.2], {
            Offset[0.4]}, 
           Offset[0.2]}}],
      "Piecewise",
      DeleteWithContents->True,
      Editable->False,
      SelectWithContents->True,
      Selectable->False,
      StripWrapperBoxes->True]}], "}"}]}], "}"}]], "Output",
 CellChangeTimes->{{3.792344212926543*^9, 3.792344241346561*^9}},
 CellLabel->"Out[78]=",ExpressionUUID->"2c727130-ddd6-427a-a986-b8cf33e6713d"]
}, Open  ]]
},
WindowSize->{1869.75, 1038.75},
WindowMargins->{{Automatic, 0}, {0, Automatic}},
FrontEndVersion->"12.1 for Linux x86 (64-bit) (March 18, 2020)",
StyleDefinitions->"Default.nb",
ExpressionUUID->"aa8b4caf-41ec-4a7f-8a67-33632a127fcc"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 152, 3, 29, "Input",ExpressionUUID->"13910d4b-4b3c-492e-8f2a-42430f35133d"],
Cell[CellGroupData[{
Cell[735, 27, 1674, 52, 193, "Input",ExpressionUUID->"c5a8e35f-d462-4bbf-a20c-9bad1df73599"],
Cell[2412, 81, 537, 17, 51, "Output",ExpressionUUID->"c41995ca-4514-4d5d-bf98-a624bbfaaeff"]
}, Open  ]],
Cell[CellGroupData[{
Cell[2986, 103, 1728, 53, 194, "Input",ExpressionUUID->"1c6177d8-fc59-4b0d-b628-9931ff1d60c4"],
Cell[4717, 158, 628, 17, 52, "Output",ExpressionUUID->"5a0322ec-5fc1-4bf8-824c-7f01d95f700f"],
Cell[5348, 177, 1162, 36, 53, "Output",ExpressionUUID->"5973b0b0-db90-4f03-a20c-4f7bf5dbd2a1"]
}, Open  ]],
Cell[CellGroupData[{
Cell[6547, 218, 2139, 68, 324, "Input",ExpressionUUID->"3382e6b4-2a7e-4f20-8028-b0ad844e92b0"],
Cell[8689, 288, 314, 7, 49, "Output",ExpressionUUID->"32aab53a-71f5-4653-9f45-ee985063780d"],
Cell[9006, 297, 297, 6, 49, "Output",ExpressionUUID->"e81619a3-1685-418c-9192-fa3ab1bd3825"],
Cell[9306, 305, 247, 4, 33, "Output",ExpressionUUID->"e86870f2-ab64-4a99-a89b-edfdbf103ef0"],
Cell[9556, 311, 494, 14, 50, "Output",ExpressionUUID->"d511aa40-18e8-46ee-af4f-45b51487cff4"],
Cell[10053, 327, 582, 17, 62, "Output",ExpressionUUID->"98b76b63-ae4b-4010-a883-31be18416e7c"],
Cell[10638, 346, 538, 16, 50, "Output",ExpressionUUID->"7e9fc5f9-05cd-4c31-8d6f-4e9e25d41eb1"]
}, Open  ]],
Cell[CellGroupData[{
Cell[11213, 367, 2557, 65, 204, "Input",ExpressionUUID->"7274f37f-2dd0-4801-b976-63d19197850c"],
Cell[13773, 434, 748, 17, 33, "Output",ExpressionUUID->"b492d0dd-ff8e-487e-a29c-1c5ab377f8f9"]
}, Open  ]],
Cell[CellGroupData[{
Cell[14558, 456, 1378, 43, 176, "Input",ExpressionUUID->"88069599-2df9-4f93-9f40-006ed9c0762d"],
Cell[15939, 501, 895, 28, 53, "Output",ExpressionUUID->"0cd1f7a9-71c8-423d-a64f-9b7bb07b863c"]
}, Open  ]],
Cell[CellGroupData[{
Cell[16871, 534, 1738, 51, 183, "Input",ExpressionUUID->"0b4c8741-1730-4cb0-acbf-aee85a17b195"],
Cell[18612, 587, 320, 5, 33, "Output",ExpressionUUID->"0193189b-9019-4ce7-868a-24e32f9dca8c"]
}, Open  ]],
Cell[CellGroupData[{
Cell[18969, 597, 4425, 118, 328, "Input",ExpressionUUID->"d5d0d391-d579-4dc1-ac57-87214064f668"],
Cell[23397, 717, 534, 7, 33, "Output",ExpressionUUID->"3fea5026-982b-445b-9ac3-570e19c1e78e"],
Cell[23934, 726, 1127, 29, 79, "Output",ExpressionUUID->"9ecfc488-f43b-41fd-b71a-2895c9da3bd5"],
Cell[25064, 757, 1324, 36, 82, "Output",ExpressionUUID->"66dcb714-b2af-487a-b0a1-47f6f9e7f69f"],
Cell[26391, 795, 736, 14, 33, "Output",ExpressionUUID->"486a55b2-bf8b-4cde-b3dd-1822a9b77719"]
}, Open  ]],
Cell[CellGroupData[{
Cell[27164, 814, 304, 8, 29, "Input",ExpressionUUID->"2c0987ad-85eb-48f1-895a-1b57b386e9b0"],
Cell[27471, 824, 1612, 51, 128, "Output",ExpressionUUID->"98a4bb52-9889-4611-8c35-bac8cfb746e3"]
}, Open  ]],
Cell[29098, 878, 131, 1, 29, "Input",ExpressionUUID->"599708d3-08ef-42cb-92b1-eeb21aaa26f8"],
Cell[29232, 881, 1650, 51, 109, "Input",ExpressionUUID->"fb728b87-753c-4f51-bf54-bffef4c25d00"],
Cell[30885, 934, 2596, 74, 151, "Input",ExpressionUUID->"4eced7a3-b604-4b4c-98de-204ff0d90cdf"],
Cell[33484, 1010, 8480, 218, 698, "Input",ExpressionUUID->"b0fc30df-a69e-4b44-b23c-ede9719acd02"],
Cell[41967, 1230, 12477, 379, 821, "Input",ExpressionUUID->"63c6debf-21ad-47c6-9f59-477455df2d4b"],
Cell[54447, 1611, 179, 3, 29, "Input",ExpressionUUID->"a8d1777d-498c-4af3-82eb-736f74712c3b"],
Cell[54629, 1616, 1195, 31, 166, "Input",ExpressionUUID->"0ad9f8f6-12ec-4454-850d-d84ec7303948"],
Cell[CellGroupData[{
Cell[55849, 1651, 7006, 191, 512, "Input",ExpressionUUID->"d8037bad-59ac-48e7-9dc4-5c1de60656f2"],
Cell[62858, 1844, 3763, 56, 70, "Message",ExpressionUUID->"be97aa52-d3db-4619-95b3-7ec0e2331284"],
Cell[66624, 1902, 2026, 39, 58, "Output",ExpressionUUID->"bfa7cdba-b2f5-4f24-80f4-1c81b7c99e29"]
}, Open  ]],
Cell[CellGroupData[{
Cell[68687, 1946, 1428, 42, 170, "Input",ExpressionUUID->"52a815ea-18b2-4465-8553-bf583ed6d2d2"],
Cell[70118, 1990, 217, 4, 33, "Output",ExpressionUUID->"ee1df760-c176-465b-b4b2-c2a18024bf0d"],
Cell[70338, 1996, 300, 7, 33, "Output",ExpressionUUID->"c1734cd7-f26c-4a71-af6c-3785eab3da9d"],
Cell[70641, 2005, 326, 8, 33, "Output",ExpressionUUID->"26eebccd-f0c8-46a5-9369-50524c8b0018"],
Cell[70970, 2015, 263, 6, 33, "Output",ExpressionUUID->"6a7c20a8-b4d0-47ff-844d-9be1e2b4b51f"]
}, Open  ]],
Cell[CellGroupData[{
Cell[71270, 2026, 2014, 57, 224, "Input",ExpressionUUID->"d05ca2f6-ecd3-4bad-bbbd-3907257cacf0"],
Cell[73287, 2085, 2417, 70, 96, "Output",ExpressionUUID->"290ef782-9b58-482f-9ae5-d91456c1df73"],
Cell[75707, 2157, 357, 9, 22, "Message",ExpressionUUID->"a187f26a-07e4-4303-8308-9670a8d2a20e"],
Cell[76067, 2168, 7039, 194, 183, "Output",ExpressionUUID->"45fe60ba-40fe-468e-9874-ce72e7e76921"]
}, Open  ]],
Cell[CellGroupData[{
Cell[83143, 2367, 2226, 64, 235, "Input",ExpressionUUID->"8f4f05df-2493-4ee0-920e-b6e535f6509c"],
Cell[85372, 2433, 490, 10, 33, "Output",ExpressionUUID->"d9f5aac2-2fc9-49ed-8346-d296073b6472"],
Cell[85865, 2445, 551, 12, 33, "Output",ExpressionUUID->"b70d5a6c-1bd4-4fac-8102-d56f744fd3f9"],
Cell[86419, 2459, 562, 12, 33, "Output",ExpressionUUID->"a8a6725f-3a41-4857-a524-c11e1e623241"],
Cell[86984, 2473, 495, 10, 33, "Output",ExpressionUUID->"737b157a-5e53-4c9d-a90d-be9856e52c68"],
Cell[87482, 2485, 442, 8, 33, "Output",ExpressionUUID->"d7ab9904-cec2-4cf2-9a5f-6ea39e7caa35"],
Cell[87927, 2495, 591, 12, 33, "Output",ExpressionUUID->"f19f4a35-bf38-40a6-80f9-9d3f82d7e4cf"]
}, Open  ]],
Cell[CellGroupData[{
Cell[88555, 2512, 1899, 59, 235, "Input",ExpressionUUID->"e820a9a2-302e-44d7-837c-11b529b5edb6"],
Cell[90457, 2573, 395, 9, 33, "Output",ExpressionUUID->"2f4c5bf1-7643-4635-b1ca-ffe7277cb383"],
Cell[90855, 2584, 458, 11, 33, "Output",ExpressionUUID->"b9946f6c-1571-4877-abc0-44e64f8e8aea"],
Cell[91316, 2597, 507, 12, 33, "Output",ExpressionUUID->"f1d6426b-2f75-4138-b1f5-907b7c21014b"],
Cell[91826, 2611, 495, 12, 33, "Output",ExpressionUUID->"cadc5d1c-0417-452d-956c-1937857b5ef9"],
Cell[92324, 2625, 432, 10, 33, "Output",ExpressionUUID->"6cf0f36c-0ad8-4de2-87c9-8edc736c97ce"],
Cell[92759, 2637, 349, 7, 33, "Output",ExpressionUUID->"1c51a19b-22a4-45f2-9bb9-f6d3e3bd2286"]
}, Open  ]],
Cell[CellGroupData[{
Cell[93145, 2649, 1541, 45, 170, "Input",ExpressionUUID->"6418b93b-b1b3-458e-961f-5dd2e66baa2d"],
Cell[94689, 2696, 246, 5, 33, "Output",ExpressionUUID->"2522dc9e-9dc4-4e01-8821-34926a44e864"],
Cell[94938, 2703, 340, 8, 33, "Output",ExpressionUUID->"aa576678-b94f-4fc5-b2c6-8b15e0aff835"],
Cell[95281, 2713, 339, 8, 33, "Output",ExpressionUUID->"d6a44561-1ebf-4867-8d2d-bf6794154450"],
Cell[95623, 2723, 264, 6, 33, "Output",ExpressionUUID->"2ce72db7-9261-44f1-be22-3f7bec3e6f05"]
}, Open  ]],
Cell[CellGroupData[{
Cell[95924, 2734, 2384, 63, 71, "Input",ExpressionUUID->"6732450b-27b0-49dd-be26-71e83158532d"],
Cell[98311, 2799, 860, 23, 96, "Output",ExpressionUUID->"2a213bf0-eb9d-4379-8b86-67605c6dd34f"]
}, Open  ]],
Cell[CellGroupData[{
Cell[99208, 2827, 417, 11, 29, "Input",ExpressionUUID->"1341ecb5-000d-40b7-a100-3efaab3a6b73"],
Cell[99628, 2840, 1073, 34, 80, "Output",ExpressionUUID->"84007be4-b03d-4ce5-923e-e30cbe4019e4"]
}, Open  ]],
Cell[100716, 2877, 534, 15, 29, "Input",ExpressionUUID->"e76284fa-10bf-4267-8968-fbe9583d1272"],
Cell[CellGroupData[{
Cell[101275, 2896, 3217, 103, 359, "Input",ExpressionUUID->"11cf21e9-80af-4174-a80f-d932abd83ecd"],
Cell[104495, 3001, 988, 22, 33, "Output",ExpressionUUID->"e9debf3f-6ec1-48b1-acc5-7717b8169a3d"]
}, Open  ]],
Cell[CellGroupData[{
Cell[105520, 3028, 1043, 38, 140, "Input",ExpressionUUID->"a7e57d84-4ae5-4abf-9110-8e9f50e61706"],
Cell[106566, 3068, 273, 6, 33, "Output",ExpressionUUID->"606bea9d-4b61-47b0-8541-96e8e20e1e86"]
}, Open  ]],
Cell[CellGroupData[{
Cell[106876, 3079, 2770, 97, 338, "Input",ExpressionUUID->"742f9632-b745-4faa-974f-f2a459d4824b"],
Cell[109649, 3178, 655, 18, 33, "Output",ExpressionUUID->"c60c0d60-c349-4567-9c65-daa8138acf96"]
}, Open  ]],
Cell[CellGroupData[{
Cell[110341, 3201, 4668, 128, 458, "Input",ExpressionUUID->"aa4bffc6-b24c-4dcb-b8d3-b3f6358e3628"],
Cell[115012, 3331, 965, 21, 33, "Output",ExpressionUUID->"35c3b2ae-4396-498c-95b3-6147e2fa977b"],
Cell[115980, 3354, 533, 8, 33, "Output",ExpressionUUID->"a4f1a2b7-8612-4212-b2d1-ddd10c6e6b69"],
Cell[116516, 3364, 686, 13, 33, "Output",ExpressionUUID->"392d0b53-9003-4dce-890f-297c707927e9"],
Cell[117205, 3379, 533, 8, 33, "Output",ExpressionUUID->"f882a138-3320-4099-9d29-20a3a35264b5"],
Cell[117741, 3389, 673, 13, 33, "Output",ExpressionUUID->"166137b2-7d86-4885-8da9-d13219152e72"],
Cell[118417, 3404, 1601, 43, 54, "Output",ExpressionUUID->"cb6266e8-6420-46ac-a620-d726a596cca5"],
Cell[120021, 3449, 1130, 29, 53, "Output",ExpressionUUID->"0afb9c9f-f7a3-40a9-a53f-aa850e24d8e3"],
Cell[121154, 3480, 769, 15, 33, "Output",ExpressionUUID->"4d40775f-eb7e-447e-933b-44efede4395d"]
}, Open  ]],
Cell[121938, 3498, 6499, 176, 566, "Input",ExpressionUUID->"6ca861b0-9c25-4e76-b363-ead5b0dbda31"],
Cell[CellGroupData[{
Cell[128462, 3678, 2317, 65, 414, "Input",ExpressionUUID->"622054ab-dfee-4aa0-b096-d515217ff63a"],
Cell[130782, 3745, 273, 6, 33, "Output",ExpressionUUID->"aac30e76-c803-46f2-b507-41c4192d989b"],
Cell[131058, 3753, 273, 6, 33, "Output",ExpressionUUID->"607835eb-db70-4ca1-8d3d-c0165b56c3db"],
Cell[131334, 3761, 275, 6, 33, "Output",ExpressionUUID->"227b3054-0654-4b40-9533-68f3f7d00cf2"]
}, Open  ]],
Cell[CellGroupData[{
Cell[131646, 3772, 1255, 37, 146, "Input",ExpressionUUID->"d98f2185-9d1b-4da4-af77-60595f1316cd"],
Cell[132904, 3811, 5018, 126, 98, "Output",ExpressionUUID->"4031a69e-9dff-4cf5-bb01-c2f02b635511"]
}, Open  ]],
Cell[CellGroupData[{
Cell[137959, 3942, 799, 19, 171, "Input",ExpressionUUID->"47963974-728f-4397-bcc9-608e5d337f46"],
Cell[138761, 3963, 418, 10, 33, "Output",ExpressionUUID->"c67fd31e-91e9-48ad-b653-4a195163d127"],
Cell[139182, 3975, 399, 9, 33, "Output",ExpressionUUID->"2f661065-22a3-4f25-b9ce-0de40bd44b0f"],
Cell[139584, 3986, 418, 10, 33, "Output",ExpressionUUID->"07528bde-94c3-4bf1-bfb9-ce3497b4d423"]
}, Open  ]],
Cell[140017, 3999, 2805, 91, 254, "Input",ExpressionUUID->"0a187e21-41de-47bd-8e47-d9c139efb55d"],
Cell[CellGroupData[{
Cell[142847, 4094, 1500, 44, 257, "Input",ExpressionUUID->"037079bc-3a13-4793-bbea-8aaa978eac08"],
Cell[144350, 4140, 468, 12, 33, "Output",ExpressionUUID->"f332d60e-fefe-4910-b3c0-2a05edefc59b"],
Cell[144821, 4154, 658, 18, 33, "Output",ExpressionUUID->"49281056-b840-4e84-b2c1-c5732e67f997"],
Cell[145482, 4174, 756, 24, 33, "Output",ExpressionUUID->"35391721-e21c-4eaa-829a-59e60128a713"]
}, Open  ]],
Cell[CellGroupData[{
Cell[146275, 4203, 747, 23, 87, "Input",ExpressionUUID->"a3861b13-ed09-44f7-93cc-f8c2e52e5aa3"],
Cell[147025, 4228, 359, 9, 33, "Output",ExpressionUUID->"07976123-9fb5-4024-8c63-02032e7df918"]
}, Open  ]],
Cell[CellGroupData[{
Cell[147421, 4242, 521, 19, 44, "Input",ExpressionUUID->"1a16df58-72bf-4488-9954-1f73222581e1"],
Cell[147945, 4263, 322, 9, 33, "Output",ExpressionUUID->"3b0bdc9c-9eff-4584-a88f-38c9fb6b8c12"]
}, Open  ]],
Cell[CellGroupData[{
Cell[148304, 4277, 597, 23, 44, "Input",ExpressionUUID->"c60b3ec2-343f-4d7b-b301-7f41a89f56cb"],
Cell[148904, 4302, 326, 9, 33, "Output",ExpressionUUID->"2119d75b-4e1e-485c-a9b1-0e4be0b2e818"]
}, Open  ]],
Cell[CellGroupData[{
Cell[149267, 4316, 1578, 53, 223, "Input",ExpressionUUID->"b1c0f38a-470c-4a5d-8b66-7b9d984bb70a"],
Cell[150848, 4371, 550, 16, 33, "Output",ExpressionUUID->"e671ca24-4d5f-4d17-8e97-ef398900c06b"],
Cell[151401, 4389, 463, 12, 36, "Output",ExpressionUUID->"0c8b9a83-d78e-453f-8621-ab76ae750dcc"]
}, Open  ]],
Cell[CellGroupData[{
Cell[151901, 4406, 5425, 181, 401, "Input",ExpressionUUID->"af52c698-e42a-48b5-80c1-11296f534362"],
Cell[157329, 4589, 2564, 59, 96, "Output",ExpressionUUID->"b825cd79-32fe-4ead-965d-aa55aeb9d94d"],
Cell[159896, 4650, 590, 12, 22, "Message",ExpressionUUID->"fe5059ea-fd5e-4f63-87b5-f0b0f494bf2c"]
}, Open  ]],
Cell[CellGroupData[{
Cell[160523, 4667, 217, 4, 29, "Input",ExpressionUUID->"ee15eabb-4e5c-4beb-bf13-2f1b5481d4ba"],
Cell[160743, 4673, 12243, 388, 195, "Output",ExpressionUUID->"4e33b403-376b-4b17-bea7-2162b7a52745"]
}, Open  ]],
Cell[173001, 5064, 117, 2, 29, "Input",ExpressionUUID->"db567b3c-c9ae-4100-b1e1-f7100ab1bda3"],
Cell[CellGroupData[{
Cell[173143, 5070, 117, 2, 29, "Input",ExpressionUUID->"853f0d37-70d7-4018-8df9-8564288c6335"],
Cell[173263, 5074, 2847, 97, 56, "Output",ExpressionUUID->"d985c745-8a88-4043-8e84-8c9e01e57fee"]
}, Open  ]],
Cell[CellGroupData[{
Cell[176147, 5176, 213, 4, 29, "Input",ExpressionUUID->"374bcc73-2b3a-46e1-9c45-8d4036582458"],
Cell[176363, 5182, 12260, 387, 168, "Output",ExpressionUUID->"44aab92f-74fe-475c-af4f-2d5a571950b0"]
}, Open  ]],
Cell[CellGroupData[{
Cell[188660, 5574, 181, 3, 29, "Input",ExpressionUUID->"faab1761-77d7-482d-b3d2-88432768a06a"],
Cell[188844, 5579, 230, 4, 33, "Output",ExpressionUUID->"72035b20-aabb-4aff-b902-b1d5271c2a38"]
}, Open  ]],
Cell[CellGroupData[{
Cell[189111, 5588, 178, 3, 29, "Input",ExpressionUUID->"9a29d74c-2224-46c1-8e4a-cac41756618a"],
Cell[189292, 5593, 170, 4, 33, "Output",ExpressionUUID->"297d80f1-9eda-485d-b989-86bf9ebdf5a7"]
}, Open  ]],
Cell[CellGroupData[{
Cell[189499, 5602, 465, 13, 29, "Input",ExpressionUUID->"791ad914-3654-4584-9ae6-088fce9864db"],
Cell[189967, 5617, 172, 4, 33, "Output",ExpressionUUID->"b73c6168-aa25-49e5-a819-dee0ea7d8235"]
}, Open  ]],
Cell[CellGroupData[{
Cell[190176, 5626, 179, 3, 29, "Input",ExpressionUUID->"f480f4ee-63b1-4edd-b909-52e72561c413"],
Cell[190358, 5631, 153, 3, 33, "Output",ExpressionUUID->"790c0b77-c8d9-4695-964a-e4ac561ff9c2"]
}, Open  ]],
Cell[CellGroupData[{
Cell[190548, 5639, 181, 3, 29, "Input",ExpressionUUID->"66697429-8a3e-4583-92c6-10bb723185f6"],
Cell[190732, 5644, 1669, 55, 50, "Output",ExpressionUUID->"c1cee358-9a3e-48cc-aabc-9cc5cf51bdd0"]
}, Open  ]],
Cell[CellGroupData[{
Cell[192438, 5704, 177, 3, 29, "Input",ExpressionUUID->"2edbd1a5-afa9-4425-9498-ef71fe949e5d"],
Cell[192618, 5709, 155, 3, 33, "Output",ExpressionUUID->"34e41108-722f-45cd-ba2c-27b07f3583be"]
}, Open  ]],
Cell[CellGroupData[{
Cell[192810, 5717, 179, 3, 29, "Input",ExpressionUUID->"aec5497d-599d-402f-89a3-f89340de5d26"],
Cell[192992, 5722, 1026, 34, 52, "Output",ExpressionUUID->"a9f991eb-1dcc-442b-a6b5-da12755966e3"]
}, Open  ]],
Cell[194033, 5759, 592, 12, 82, "Input",ExpressionUUID->"9b7f3a75-90ee-47da-89bd-0e40e81c61bd"],
Cell[194628, 5773, 5323, 147, 351, "Input",ExpressionUUID->"71e3761a-ee9f-4db1-82e8-1df90fe9278d"],
Cell[CellGroupData[{
Cell[199976, 5924, 177, 3, 30, "Input",ExpressionUUID->"ffb16e15-22fe-4df9-8071-0d2aa714956d"],
Cell[200156, 5929, 1689, 53, 34, "Output",ExpressionUUID->"19647d73-6a2c-4d64-914e-a4dbb90c8c2d"]
}, Open  ]],
Cell[CellGroupData[{
Cell[201882, 5987, 119, 2, 30, "Input",ExpressionUUID->"f514e9f4-82cf-4b1e-9bce-2b94a2fad63e"],
Cell[202004, 5991, 10967, 315, 146, "Output",ExpressionUUID->"cf3d22b7-2c4a-49db-b0d1-070295f21364"]
}, Open  ]],
Cell[CellGroupData[{
Cell[213008, 6311, 119, 2, 30, "Input",ExpressionUUID->"9c75bd1a-2866-4f18-94dd-1e27743465eb"],
Cell[213130, 6315, 11300, 316, 146, "Output",ExpressionUUID->"6e494cbb-d06c-46fa-a171-8ee8c6cd07c0"]
}, Open  ]],
Cell[CellGroupData[{
Cell[224467, 6636, 119, 2, 30, "Input",ExpressionUUID->"3cb88bd5-d153-411d-a55d-80d85c83c61e"],
Cell[224589, 6640, 11641, 318, 146, "Output",ExpressionUUID->"8ece111e-1671-4b0b-8022-ad3d3d476c07"]
}, Open  ]],
Cell[CellGroupData[{
Cell[236267, 6963, 267, 6, 30, "Input",ExpressionUUID->"0609179e-ebea-43cc-bcc9-7856a7ca1904"],
Cell[236537, 6971, 475, 10, 26, "Message",ExpressionUUID->"4f3f48b9-9ae2-4687-8230-1fc788b488bd"],
Cell[237015, 6983, 275, 6, 34, "Output",ExpressionUUID->"80b4c6f5-0571-4a89-99dc-1875b990dbd3"]
}, Open  ]],
Cell[CellGroupData[{
Cell[237327, 6994, 111, 2, 30, "Input",ExpressionUUID->"b5028d97-3553-4f2d-ac23-722718dd91c5"],
Cell[237441, 6998, 154, 3, 34, "Output",ExpressionUUID->"5420832b-680c-4823-903f-0e5df8e8a235"]
}, Open  ]],
Cell[CellGroupData[{
Cell[237632, 7006, 383, 10, 30, "Input",ExpressionUUID->"63636b38-244a-48c7-bbea-6d8b85960cee"],
Cell[238018, 7018, 179, 3, 34, "Output",ExpressionUUID->"23c8ee17-fb99-464d-8da1-0280d8d4bbe3"]
}, Open  ]],
Cell[CellGroupData[{
Cell[238234, 7026, 258, 6, 30, "Input",ExpressionUUID->"962b8169-c06e-4544-bea4-40a3fd186c9b"],
Cell[238495, 7034, 9032, 240, 37, "Output",ExpressionUUID->"d53792a7-92bc-4212-bdc3-64b1b3c0ca66"]
}, Open  ]],
Cell[CellGroupData[{
Cell[247564, 7279, 212, 4, 30, "Input",ExpressionUUID->"f509cb28-597b-45f0-be8d-065fc7345872"],
Cell[247779, 7285, 1836, 51, 53, "Output",ExpressionUUID->"928f2f5e-c7c8-47cd-ba11-96b5097d690a"]
}, Open  ]],
Cell[CellGroupData[{
Cell[249652, 7341, 271, 6, 30, "Input",ExpressionUUID->"c18c4fc8-3217-46f1-8210-cd92577386cf"],
Cell[249926, 7349, 1016, 31, 53, "Output",ExpressionUUID->"bed1a98c-19a1-42a1-810d-d99df04d3c28"]
}, Open  ]],
Cell[250957, 7383, 352, 6, 30, "Input",ExpressionUUID->"5bafe042-ec7c-493e-9b3d-7a76b82f5804"],
Cell[CellGroupData[{
Cell[251334, 7393, 429, 11, 82, "Input",ExpressionUUID->"15b1d369-ef04-46e8-b21d-f68f53dccd40"],
Cell[251766, 7406, 1379, 36, 34, "Output",ExpressionUUID->"9872eaed-b5ec-47fa-ad34-3c1538549cb5"]
}, Open  ]],
Cell[CellGroupData[{
Cell[253182, 7447, 585, 16, 30, "Input",ExpressionUUID->"0a056487-b85d-4cf1-93f2-da941f58a76d"],
Cell[253770, 7465, 429, 11, 34, "Output",ExpressionUUID->"2102046e-35b4-43af-b144-26275d6aea1e"]
}, Open  ]],
Cell[254214, 7479, 217, 4, 30, "Input",ExpressionUUID->"60c1c749-20f3-4fba-8a2f-f5f6cf5a88c5"],
Cell[254434, 7485, 1961, 63, 228, "Input",ExpressionUUID->"881e1115-9720-46fe-90d2-80e0854c0ea8"],
Cell[CellGroupData[{
Cell[256420, 7552, 462, 20, 227, "Input",ExpressionUUID->"92284809-2446-4e45-8db3-b5916b09c6dc"],
Cell[256885, 7574, 3937, 126, 231, "Output",ExpressionUUID->"9b6a1d26-869e-4a5c-9bc6-07335a32cbfa"]
}, Open  ]],
Cell[CellGroupData[{
Cell[260859, 7705, 436, 19, 227, "Input",ExpressionUUID->"da5f068c-5ea9-41f0-8368-95889dbe524d"],
Cell[261298, 7726, 3962, 126, 231, "Output",ExpressionUUID->"55126a11-3c26-438a-ab9f-4de00935cf47"]
}, Open  ]],
Cell[CellGroupData[{
Cell[265297, 7857, 1321, 52, 228, "Input",ExpressionUUID->"e7221398-5eb4-4782-8d8d-cb98085d42a0"],
Cell[266621, 7911, 182, 3, 34, "Output",ExpressionUUID->"fe393116-1722-4b7e-82a9-4bec41fef86a"]
}, Open  ]],
Cell[CellGroupData[{
Cell[266840, 7919, 389, 18, 227, "Input",ExpressionUUID->"99c7b09f-2d1b-45f2-96dc-d9da3609fdf1"],
Cell[267232, 7939, 3576, 113, 57, "Output",ExpressionUUID->"7851cc40-62a8-43da-b8a2-0d16494a6ef1"]
}, Open  ]],
Cell[CellGroupData[{
Cell[270845, 8057, 1229, 32, 227, "Input",ExpressionUUID->"37e73f82-c8a5-494d-a2fe-21e8e052314c"],
Cell[272077, 8091, 685, 19, 34, "Output",ExpressionUUID->"f88d98f0-3b73-4822-991c-4dcc1210c917"]
}, Open  ]],
Cell[CellGroupData[{
Cell[272799, 8115, 1991, 52, 228, "Input",ExpressionUUID->"59261354-aa49-4562-af2a-c27e2e2d8011"],
Cell[274793, 8169, 399, 9, 26, "Message",ExpressionUUID->"9e7b4205-66e5-48bb-8e76-01fe80d9aa22"],
Cell[275195, 8180, 2650, 63, 57, "Output",ExpressionUUID->"17922105-c391-42f5-b5d1-23e684316499"]
}, Open  ]],
Cell[CellGroupData[{
Cell[277882, 8248, 1086, 37, 228, "Input",ExpressionUUID->"b569b52f-2f1a-4e26-b12a-7ba8516291d0"],
Cell[278971, 8287, 324, 8, 26, "Message",ExpressionUUID->"6de4dc04-18e6-4842-bca0-7f7ce8e0fb60"],
Cell[279298, 8297, 3330, 83, 78, "Output",ExpressionUUID->"23c55b47-94b4-4861-8093-f279f4e2c240"]
}, Open  ]],
Cell[CellGroupData[{
Cell[282665, 8385, 1086, 37, 228, "Input",ExpressionUUID->"d2382b20-d790-43b1-a355-571532eeb682"],
Cell[283754, 8424, 422, 9, 26, "Message",ExpressionUUID->"b233e1a9-f422-4afe-aef8-653a3bf144a1"],
Cell[284179, 8435, 3428, 84, 78, "Output",ExpressionUUID->"cdd93294-a70b-485a-af80-e64289856e9a"]
}, Open  ]],
Cell[CellGroupData[{
Cell[287644, 8524, 1326, 40, 228, "Input",ExpressionUUID->"8541213f-c00a-4595-8250-d4bce1ce1d5f"],
Cell[288973, 8566, 399, 10, 26, "Message",ExpressionUUID->"dd3c1e7a-b178-458f-9c53-1c8d02196f48"]
}, Open  ]],
Cell[CellGroupData[{
Cell[289409, 8581, 361, 8, 30, "Input",ExpressionUUID->"f6ba9323-fe0d-43ca-8999-497f45e0e33a"],
Cell[289773, 8591, 6712, 181, 81, "Output",ExpressionUUID->"2c727130-ddd6-427a-a986-b8cf33e6713d"]
}, Open  ]]
}
]
*)

